forked from wifislax-ng/wifislax-updaters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzope.interface_updater
executable file
·67 lines (60 loc) · 1.86 KB
/
zope.interface_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
#!/bin/sh
# Script by www.seguridadwireless.net
SCRIPT_VERSION=20160611
############################################################
## 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() {
PRGNAM=zope.interface
echo -ne "\033]2;${PRGNAM}_updater\007"
WEB=https://pypi.python.org/pypi/$PRGNAM/
VERSION=`curl -s $WEB|grep $PRGNAM/[0-9]|head -1|cut -d / -f4|cut -d '"' -f-1`
EXTENSION=tar.gz
SOURCES=$PRGNAM-$VERSION.$EXTENSION
DOWNLOAD=`curl -s $WEB|grep $SOURCES|grep https|head -1|cut -d '"' -f2|cut -d '#' -f-1`
}
# Descomprimimos el fichero descargado y compilamos
F_compilar(){
echo
echo "$VERDE"Compilando ..."$CIERRE"
sleep 1
python setup.py install --root=$PKG
}
###################################
## 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 paquete
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