#!/bin/bash export TEXTDOMAIN="gearth" MSG_BAJAR=$(gettext "Google Earth will now be installed. Aprox. size 50MB") MSG_NO_INTERNET=$(gettext "No Internet Connection has been detected. Please, check it") MSG_MINUTOS=$(gettext "This operation can take a few minutes. Please wait") MSG_BAJANDO_FICHEROS=$(gettext "Necessary files are being downloaded") MSG_GENERANDO_PAQUETE=$(gettext "Google Earth package is being built up") MSG_COPIAR=$(gettext "Would you like to save a copy of *.deb for a future installation") MSG_GUARDAR=$(gettext "Choose a directory for saving the file copy") MSG_INSTALAR=$(gettext "Would you like to install Google Earth in this PC?") MSG_INSTALL_COMPLETA=$(gettext "Installation has been completed. You can access Google Earth throught Applications/Internet.") MSG_DESCARGA_COMPLETA=$(gettext "Google Earth has been successfully downloaded") #COMPROBAMOS CONEXION A INTERNET rc=0 host dl.google.com || rc=1 if [ $rc -eq 0 ] then zenity --info --text="$MSG_BAJAR" apt-get update synaptic --hide-main-window --non-interactive --set-selections-file /usr/share/lliurex-zero-installers/gearth-packages else zenity --error --text="$MSG_NO_INTERNET" exit 0 fi #DESCARGAMOS FICHERO BIN (.BIN) rc=0 host server.aula || rc=1 if [ $rc -eq 0 ] then HTTPPROXY=$http_proxy export http_proxy="proxy:3128" make-googleearth-package --force 2>&1 | zenity --progress --pulsate --auto-close --auto-kill --text="$MSG_MINUTOS" --title="$MSG_BAJANDO_FICHEROS" --width=500 export http_proxy=$HTTPPROXY else make-googleearth-package --force 2>&1 | zenity --progress --pulsate --auto-close --auto-kill --text="$MSG_MINUTOS" --title="$MSG_BAJANDO_FICHEROS" --width=500 fi #CREAR el PAQUETE (.DEB) make-googleearth-package --force 2>&1 | zenity --progress --pulsate --auto-close --auto-kill --text="$MSG_MINUTOS" --title="$MSG_GENERANDO_PAQUETE" --width=500 # PREGUNTAR SI LO QUIERE GUARDAR if zenity --question --text="$MSG_COPIAR"; then RUTA=$(zenity --file-selection --directory --text="$MSG_GUARDAR" ) cp googleearth_*.deb $RUTA fi # PREGUNTAR SI LO QUIERE INSTALAR if zenity --question --text="$MSG_INSTALAR"; then dpkg -i googleearth_*.deb zenity --info --text="$MSG_INSTALL_COMPLETA" else zenity --info --text="$MSG_DESCARGA_COMPLETA" fi #LIMPIA Y DA ESPLENDOR rm -f googleearth_*.deb rm -f GoogleEarthLinux.bin zero-sqlmanager -s zero-lliurex-gearth 1 exit 0