#!/bin/bash export TEXTDOMAIN="lliurex-jclic-biblioteca-installer" M_MSG_BAJAR=$(gettext "Murcia Library will now be downloaded. Aprox. size 1,3GB") R_MSG_BAJAR=$(gettext "Ratoli Library will now be downloaded. Aprox. size 2GB") E_MSG_BAJAR=$(gettext "Elteumestre Library will now be downloaded. Aprox. size 3GB") MSG_NO_INTERNET=$(gettext "No Internet Connection has been detected. Please, check it") MSG_GUARDAR=$(gettext "Choose a directory for saving the file copy") MSG_MINUTOS=$(gettext "This operation can take a few minutes. Please wait") M_MSG_DESCARGA=$(gettext "Murcia Library is being downloaded") R_MSG_DESCARGA=$(gettext "Ratoli Library is being downloaded") E_MSG_DESCARGA=$(gettext "Elteumestre Library is being downloaded") M_MSG_DESCARGA_COMPLETA=$(gettext "Murcia Library has been successfully downloaded") R_MSG_DESCARGA_COMPLETA=$(gettext "Ratoli Library has been successfully downloaded") E_MSG_DESCARGA_COMPLETA=$(gettext "Elteumestre Library has been successfully downloaded") #Comprobar conexión a internet e instalar rc=0 host arxiu.lliurex.net || rc=1 if [ $rc -eq 0 ] then zenity --info --text="$M_MSG_BAJAR" RUTA=$(zenity --file-selection --directory --text="$MSG_GUARDAR" ) if [ $? -eq 0 ] then IMAGENES="ftp://arxiu.lliurex.net/pub/recursos/Murcia_0809.tar.gz" rc=0 host server.aula || rc=1 if [ $rc -eq 0 ] then FTPPROXY=$ftp_proxy export ftp_proxy="proxy:3128" GETTING="gwget -d "$RUTA"/ "$IMAGENES"" su $USERNAME -c """$GETTING""" export ftp_proxy=$FTPPROXY else GETTING="gwget -d "$RUTA"/ "$IMAGENES"" su $USERNAME -c """$GETTING""" fi zero-sqlmanager -s murcia 1 fi else zenity --error --text="$MSG_NO_INTERNET" fi exit 0