source: zero-lliurex-s4a/trunk/fuentes/zero-lliurex-s4a.zlaunchers/zero-lliurex-s4a.zmd @ 4919

Last change on this file since 4919 was 4919, checked in by jrpelegrina, 2 years ago

Fix bug in zmd file

File size: 2.8 KB
Line 
1#!/bin/bash
2set -e
3export TEXTDOMAIN="zero-lliurex-s4a"
4MSG_NO_INTERNET=$(gettext "No Internet Connection has been detected. Please, check it")
5
6
7
8
9zero-center add-pulsating-color zero-lliurex-s4a
10
11
12#Comprobar conexion a internet e instalar
13rc=0
14zero-testnet || rc=1
15if [ $rc -eq 0 ]; then
16        echo "Internet is ok...........continue"
17else
18        ######NO TENEMOS CONEXION A INTERNET
19        zenity --error --text="$MSG_NO_INTERNET" > /dev/null 2>&1
20        zero-center set-non-configured zero-lliurex-s4a
21        zero-center remove-pulsating-color zero-lliurex-s4a
22        exit 1
23
24fi
25###### COMPROBAMOS SI ES PARA 64 BITS O 32 Y ELEGIMOS INSTALACION EN CADA CASO
26
27uname -m > /tmp/architectur.txt
28if [ $(grep "x86_64" /tmp/architectur.txt) ] ; then
29        ARCH="64"
30        echo "64 Bits distro, upgrading your system............"
31else
32        ARCH="32"
33fi
34echo "Version de la maquina $ARCH bits"
35
36if [ $ARCH = "64" ] ; then
37       
38        ########PREPARACION DEL SISTEMA PARA INSTALACION EN DISTRO DE 64 BITS
39       
40        dpkg --add-architecture i386
41        zero-repos-update || true
42
43       
44fi
45
46
47echo "libv4l-0:i386 install" > /tmp/list64.txt
48echo "libsm6:i386 install"  >> /tmp/list64.txt
49echo "libice6:i386 install"  >> /tmp/list64.txt
50echo "libpangocairo-1.0.0:i386 install" >> /tmp/list64.txt
51echo "libcairo2:i386 install" >> /tmp/list64.txt
52echo "libpulse0:i386 install" >> /tmp/list64.txt
53echo "libasound2:i386 install" >> /tmp/list64.txt
54echo "libpulse-dev:i386 install" >> /tmp/list64.txt
55echo "libx11-6:i386 install" >> /tmp/list64.txt
56
57echo "s4a install" >> /tmp/list64.txt
58
59zero-installer -l /tmp/list64.txt || true
60
61######COMPROBAMOS QUE LA LISTA SE INSTALO BIEN ABORTANDO EL PROCESO SI FALLO ALGUN PAQUETE
62
63
64# Comprobacion que faltaba algun paquete en el repositorio
65if  [[ $(rgrep "in your repositories" /tmp/zero-installer.log) ]]; then
66        echo "We can't install some packages from your repository view details in /tmp/zero-install.log" 
67        zenity --info --title="Zero-installer" --text="We can't install some packages from your repository view details in /tmp/zero-install.log " > /dev/null 2>&1 &
68        zero-center set-non-configured zero-lliurex-s4a
69        zero-center remove-pulsating-color zero-lliurex-s4a
70        exit 1
71fi
72
73# Comprobacion dependencias en las librerias solventadas
74ldd /usr/lib/s4a/Plugins/* | grep "not found" >  /tmp/.s4a-installer.log || true
75if  [[ $(rgrep "found" /tmp/.s4a-installer.log) ]]; then
76        echo "You have dependences unsolved please review /tmp/.s4a-installer.log" 
77        zenity --info --title="Zero-installer" --text="You have dependences unsolved please review /tmp/.s4a-installer.log " > /dev/null 2>&1 &
78        zero-center set-non-configured zero-lliurex-s4a
79        zero-center remove-pulsating-color zero-lliurex-s4a
80        exit 1
81fi
82               
83                       
84
85       
86
87echo "Correct you have installed all you need for S4A, congratulations!!"
88zero-center remove-pulsating-color zero-lliurex-s4a
89zero-center set-configured zero-lliurex-s4a
90
91
92exit 0
Note: See TracBrowser for help on using the repository browser.