#!/bin/bash export TEXTDOMAIN="zero-lliurex-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") current_version="google-earth-stable_current_amd64.deb" url="http://dl.google.com/dl/earth/client/current/" temp="/tmp/google_temp.deb" #COMPROBAMOS CONEXION A INTERNET rc=0 host dl.google.com || rc=1 if [ $rc -eq 0 ] then zenity --info --text="$MSG_BAJAR" axel -o $temp $url$current_version else zenity --error --text="$MSG_NO_INTERNET" exit 0 fi #DESCARGAMOS FICHERO BIN (.BIN) flag=0 lliurex-version | grep server if [ $? -eq 0 ]; then flag=1 else host proxy if [ $? -ne 0 ]; then flag=1 fi fi if [ $flag -eq 0 ]; then export http_proxy="proxy:3128" fi # PREGUNTAR SI LO QUIERE GUARDAR if zenity --question --text="$MSG_COPIAR"; then RUTA=$(zenity --file-selection --directory --text="$MSG_GUARDAR" ) cp $temp $RUTA fi # PREGUNTAR SI LO QUIERE INSTALAR if zenity --question --text="$MSG_INSTALAR"; then dpkg -i $temp zenity --info --text="$MSG_INSTALL_COMPLETA" else zenity --info --text="$MSG_DESCARGA_COMPLETA" fi #LIMPIA Y DA ESPLENDOR rm -f $temp zero-sqlmanager -s zero-lliurex-gearth 1 exit 0