#!/bin/bash #synaptic --hide-main-window --non-interactive --set-selections-file /usr/share/lliurex-zero-installers/install-pyromaths #zero-center set-configured install-pyromaths #exit 0 PACKAGE_LIST="/usr/share/lliurex-zero-installers/install-pyromaths" PACKAGE_NAME="Pyromaths" zero-center add-pulsating-color install-pyromaths zero-reinstall-list "$PACKAGE_LIST" "$PACKAGE_NAME" #Testeamos si todo se instalo como esperabamos, sino mostramos el error LISTA=( $( cat $PACKAGE_LIST | awk '{print $1}' ) ) for i in "${LISTA[@]}"; do TEST=$( dpkg-query -s $i 2> /dev/null| grep Status | cut -d " " -f 4 ) if [ "$TEST" != 'installed' ]; then #zenity --info --title="Zero-installer" --text="Package $PACKAGE_NAME is not installed in your system, please retry again and test if you have acess to repositories in net, or contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums" > /dev/null 2>&1 & su -c "notify-send -t 2000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Package $PACKAGE_NAME is not installed in your system, please retry again or contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums'" $USER zero-center remove-pulsating-color install-pyromaths zero-center set-non-configured install-pyromaths exit 1 fi done zenity --info --title="Zenity-installer" --text="$PACKAGE_NAME is installed in your system, and you can see the resume in /tmp/zero-install.log" & zero-center remove-pulsating-color install-pyromaths zero-center set-configured install-pyromaths exit 0