#!/bin/bash export TEXTDOMAIN="zero-lliurex-resource-browser" MSG_NO_INTERNET=$"No Internet Connection has been detected. Please, check it" MSG_BAJAR=$"cefpython required library. Aprox. size 33MB" MSG_LOCALIZAR=$"Now you can run cef python Applications." #Comprobar conexión a internet e instalar rc=0 host dl.google.com || rc=1 if [ $rc -eq 0 ] then zenity --info --text="$MSG_BAJAR" uname -a | grep -q "x86_64" if [ $? -eq 0 ]; then DownloadFile="cefpython3-27.2-ubuntu1204-64bit-setup.zip" SetupDir="cefpython3-27.2-ubuntu1204-64bit-setup" else DownloadFile="cefpython3-27.2-ubuntu1204-32bit-setup.zip" SetupDir="cefpython3-27.2-ubuntu1204-32bit-setup" fi rc=0 host server.aula || rc=1 if [ $rc -eq 0 ] then export http_proxy="proxy:3128" #su $USER -c "wget -O /tmp/$DownloadFile http://cefpython.googlecode.com/files/$DownloadFile" wget -O /tmp/$DownloadFile http://cefpython.googlecode.com/files/$DownloadFile else #su $USER -c "wget -O /tmp/$DownloadFile http://cefpython.googlecode.com/files/$DownloadFile" wget -O /tmp/$DownloadFile http://cefpython.googlecode.com/files/$DownloadFile fi #su $USER -c "unzip /tmp/$DownloadFile -d /tmp/" unzip /tmp/$DownloadFile -d /tmp/ #su $USER -c "(cd /tmp/$SetupDir && python /tmp/$SetupDir/setup.py install)" (cd /tmp/$SetupDir && python /tmp/$SetupDir/setup.py install) #su $USER -c "apt-get install llx-resource-browser" apt-get install llx-resource-browser zenity --info --text="$MSG_LOCALIZAR" zero-sqlmanager -s zero-lliurex-resource-browser 1 else zenity --error --text="$MSG_NO_INTERNET" fi exit 0