#!/bin/bash TOKEN=0 PACKAGE_LIST="/usr/share/lliurex-zero-installers/install-languages" THISPACKAGE="Idioma" export TEXTDOMAIN="lliurex-zero-installer-generic" ERROR_TEXT1="$(gettext 'The package')" ERROR_TEXT2="$(gettext 'has not been installed.\nCheck if mirror was created or your sources.list is update today.')" ERROR_TEXT="$ERROR_TEXT1 $THISPACKAGE $ERROR_TEXT2" for x in $(cat $PACKAGE_LIST | sed -e "s%^\([[:graph:]]\+\).*%\1%g" | tr "\n" " "); do a=$(apt-cache search $x) if [ -z "$a" ]; then TOKEN=0 break fi done if [ $TOKEN -eq 1 ]; then zenity --error --text="$ERROR_TEXT" exit 0 fi apt-get update synaptic --hide-main-window --non-interactive --set-selections-file $PACKAGE_LIST zero-sqlmanager -s install-languages 1 exit 0