Changeset 4802


Ignore:
Timestamp:
May 16, 2017, 2:58:42 PM (2 years ago)
Author:
daduve
Message:

Updating script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-s4a/trunk/fuentes/zero-lliurex-s4a.zlaunchers/zero-lliurex-s4a.zmd

    r4789 r4802  
    11#!/bin/bash
    2 
     2set -e
    33export TEXTDOMAIN="zero-lliurex-s4a"
    44MSG_NO_INTERNET=$(gettext "No Internet Connection has been detected. Please, check it")
     
    1616        echo "Internet is ok...........continue"
    1717else
     18        echo "jjjjjjj"
    1819        ######NO TENEMOS CONEXION A INTERNET
    1920        zenity --error --text="$MSG_NO_INTERNET" > /dev/null 2>&1
     
    2223        exit 1
    2324
    24 
     25fi
    2526###### COMPROBAMOS SI ES PARA 64 BITS O 32 Y ELEGIMOS INSTALACION EN CADA CASO
    2627
     
    3940       
    4041        dpkg --add-architecture i386
     42        zero-repos-update || true
    4143
    4244       
     
    5153echo "libpulse0:i386 install" >> /tmp/list64.txt
    5254echo "libasound2:i386 install" >> /tmp/list64.txt
    53 echo "s4a" >> /tmp/list64.txt
     55echo "s4a install" >> /tmp/list64.txt
    5456
    55 zero-installer -l /tmp/list64.txt
     57zero-installer -l /tmp/list64.txt || true
    5658
    57 if [ $? -ne 0 ]
    58 then
    59        
    60         zenity --info --title="Zero-installer" --text="For some reason some packages couldn't be installed. View details in /tmp/zero-list64.txt.log " > /dev/null 2>&1 &
    61         echo
    62         echo "Some or any packages are not installed"
    63         echo
     59######COMPROBAMOS QUE LA LISTA SE INSTALO BIEN ABORTANDO EL PROCESO SI FALLO ALGUN PAQUETE
     60
     61
     62# Comprobacion que faltaba algun paquete en el repositorio
     63if  [ $(rgrep "in your repositories" /tmp/zero-installer.log) ]; then
     64        echo "We can't install some packages from your repository view details in /tmp/zero-install.log"
     65        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 &
     66        zero-center set-non-configured zero-lliurex-s4a
     67        zero-center remove-pulsating-color zero-lliurex-s4a
    6468        exit 1
    6569fi
    66 
    67 ######COMPROBAMOS QUE LA LISTA SE INSTALO BIEN ABORTANDO EL PROCESO SI FALLO ALGUN PAQUETE
    68 fgrep "is not in repository" /tmp/zero-list64.txt.log
    69 
    70 # Comprobacion que faltaba algun paquete en el repositorio
    71 if  [ "$?" == "0" ]; then
    72         zenity --info --title="Zero-installer" --text="We can't install some packages from your repository view details in /tmp/zero-list64.txt.log " > /dev/null 2>&1 &
    73         exit 1
    74 fi
    75 
    76 #Comprobacion de que los paquetes estan instalados sin problemas.
    77 
    78 for PACKET in $( cat /tmp/list64.txt | awk '{print$1}' )
    79 do
    80         PKG_OK=$(dpkg-query -W --showformat='${Status}\n'  $PACKET | grep "install ok installed")
    81         if [ "" == "$PKG_OK" ]; then
    82                 zenity --info --title="Zero-installer" --text="We can't install some packages from your repository view details in /tmp/zero-list64.txt.log " > /dev/null 2>&1 &
    83                 echo
    84                 echo "Some or any packages are not installed"
    85                 echo
    86                 zero-center set-non-configured zero-lliurex-s4a
    87                 zero-center remove-pulsating-color zero-lliurex-s4a
    88                 exit 1
    89         fi
    90 done
    9170               
    9271                       
     
    9473       
    9574
    96 
     75echo "Correct you have installed all you need for S4A, congratulations!!"
    9776zero-center remove-pulsating-color zero-lliurex-s4a
    9877zero-center set-configured zero-lliurex-s4a
Note: See TracChangeset for help on using the changeset viewer.