#!/bin/bash export TEXTDOMAIN="zero-lliurex-adobeair" MSG_NO_INTERNET=$(gettext "No Internet Connection has been detected. Please, check it") MSG_BAJAR=$(gettext "Adobe Air will now be downloaded. Aprox. size 10,3MB") MSG_LOCALIZAR=$(gettext "Now you can install your Adobe AIR application. Use Applications-Accesories-Adobe AIR Applications Installer.") #Comprobar conexión a internet elaula=www.lliurexforever.jai n4d-vars listvars | grep HOSTNAME if [ $? -eq 0 ]; then elhost=$(n4d-vars getvalues HOSTNAME | cut -d"'" -f2) eldominio=$(n4d-vars getvalues INTERNAL_DOMAIN | cut -d"'" -f2) elaula=$elhost"."$eldominio fi zero-center add-pulsating-color zero-lliurex-adobeair #Comprobar conexión a internet e instalar rc=0 host www.lliurex.net || rc=1 if [ $rc -eq 0 ] then #Problemas al instalar adobeair requieren de la creación manual de links Lso0="FALSE" Lso020="FALSE" uname -a | grep -q "x86_64" if [ $? -eq 0 ]; then if [ ! -L /usr/lib/libgnome-keyring.so.0 ]; then sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0 Lso0="TRUE" fi if [ ! -L /usr/lib/libgnome-keyring.so.0.2.0 ]; then sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0 Lso020="TRUE" fi else if [ ! -L /usr/lib/libgnome-keyring.so.0 ]; then sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0 Lso0="TRUE" fi if [ ! -L /usr/lib/libgnome-keyring.so.0.2.0 ]; then sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0 Lso020="TRUE" fi fi zenity --info --text="$MSG_BAJAR" rc=0 host $elaula || rc=1 if [ $rc -eq 0 ] then export http_proxy="proxy:3128" su $USER -c "wget -O /tmp/AdobeAIRInstaller.bin http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin" else su $USER -c "wget -O /tmp/AdobeAIRInstaller.bin http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin" fi su $USER -c "chmod +x /tmp/AdobeAIRInstaller.bin" su $USER -c "/tmp/AdobeAIRInstaller.bin" #Devolver los links a su estado if [ Lso0 ]; then ls /usr/lib/libgnome-keyring* sudo rm -rf /usr/lib/libgnome-keyring.so.0 fi if [ Lso020 ]; then ls /usr/lib/libgnome-keyring* sudo rm -rf /usr/lib/libgnome-keyring.so.0.2.0 fi zenity --info --text="$MSG_LOCALIZAR" else zenity --error --text="$MSG_NO_INTERNET" zero-center remove-pulsating-color zero-lliurex-adobeair exit 1 fi zero-center remove-pulsating-color zero-lliurex-adobeair zero-center set-configured zero-lliurex-adobeair exit 0