forked from wifislax-ng/wifislax-updaters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbluefish_updater
executable file
·94 lines (85 loc) · 2.68 KB
/
bluefish_updater
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/sh
# Script by www.seguridadwireless.net
SCRIPT_VERSION=20151116
############################################################
## Funciones comunes. Su nombre empieza por f_ ##
############################################################
f_variables(){
. /opt/wifislax-updaters/Funciones/funciones_updater
}
############################################################
## Funciones propias del script. Su nombre empieza por F_ ##
############################################################
# Definicion de variables
F_variables() {
WEB=http://www.bennewitz.com/bluefish/stable/source/
VERSION=`curl -s $WEB | grep bluefish- | tail -1 | cut -d '"' -f 8 | cut -d "t" -f1 | cut -d- -f 2 | sed 's/.$//g'`
PRGNAM=bluefish
echo -ne "\033]2;${PRGNAM}_updater\007"
EXTENSION=tar.gz
SOURCES=$PRGNAM-$VERSION.$EXTENSION
DOWNLOAD=$WEB$SOURCES
}
# Configuramos paquete
F_compilar(){
echo ""
echo "$VERDE"Configurando ..."$CIERRE"
sleep 1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-update-databases \
--disable-xml-catalog-update \
--build=$ARCH-slackware-linux
make || exit 1
make install DESTDIR=$PKG
cd $PKG
# Modificamos el desktop
echo "[Desktop Entry]
Name=Bluefish Editor
Name[es]=Editor Bluefish
Exec=bluefish %F
Icon=bluefish
Terminal=false
Type=Application
StartupNotify=true
Categories=Development;
MimeType=text/html;text/css;text/x-javascript;text/x-python;text/x-perl;application/x-php;text/x-java;text/javascript;text/x-php;application/x-cgi;application/x-javascript;application/x-perl;application/x-python;application/xhtml+xml;text/mathml;text/x-csrc;text/x-chdr;text/x-dtd;text/x-sql;text/xml;application/x-bluefish-project;
" > $PKG/usr/share/applications/bluefish.desktop
}
###################################
## BLOQUE PRINCIPAL DE EJECUCION ##
###################################
# Si se cierra el script inesperadamente, ejecutar la funcion de limpieza
trap f_exitmode SIGHUP SIGINT
#Inicializamos las variables globales
f_variables
#Comprobamos conexion a Internet
f_comprobarConexion
#Inicializamos las variables del script
F_variables
#Creamos directorio de trabajo
f_directorioTemporal
#Mostramos el mensaje de presentacion
f_presentacion
#Comprobamos updates del script
f_comprobarUpdates
#Asignamos o detectamos arquitectura
f_arquitectura
#Comprobamos version instalada del script
f_versionInstalada
#Si no existe el fichero se descargara
f_download
#Preparamos entorno
f_preparar
#Descomprimir fichero descargado y compilamos
F_compilar
#Hacemos strip sobre el paquete
f_strip
#Creamos xzm , instalamos y salimos
f_tareasFinales