#!/bin/bash export TEXTDOMAIN="lliurex-smart" SMARTPATH="/opt/SMART Technologies/" DIRTOBACKUP="Notebook Galleries/" OPTIONS[1]=$(gettext "Install new galleries") OPTIONS[2]=$(gettext "Export galleries") OPTIONS[3]=$(gettext "Import galleries") OPTIONS[4]=$(gettext "Exit") TITLE=$(gettext "What do you want to do?") while true ; do op=$(zenity --list --height=212\ --title="$TITLE" \ --column="" --column="Actions" \ 1 "${OPTIONS[1]}" \ 2 "${OPTIONS[2]}" \ 3 "${OPTIONS[3]}" \ 4 "${OPTIONS[4]}") if [ $? -eq 0 ] ; then case $op in 1) #Path of gallery manager bin /opt/SMART\ Technologies/Gallery\ Setup/bin/GallerySetup --guid gallery.smarttech.com ;; 2) #Compress DIRTOBACKUP on FILE directory AUX=$(gettext "Choose where export") FILE=`zenity --file-selection --title="$AUX" --directory` cd "$SMARTPATH" tar -czpPf $FILE/smart-gallery.tar.gz "$DIRTOBACKUP" ;; 3) #Descompress zip on AUX=$(gettext "Select the file to import") FILE=`zenity --file-selection --title="$AUX"` tar -xzf $FILE -C "$SMARTPATH" ;; 4) #Exit program with ok exit 0 esac else exit 1 fi done