Only add confirmation if not installing for the first time

This commit is contained in:
Bob Mottram 2016-10-17 20:02:36 +01:00
parent 1fc24f5e5c
commit 0360845f71
1 changed files with 13 additions and 10 deletions

View File

@ -132,6 +132,7 @@ function remove_apps_selected {
function install_apps_selected { function install_apps_selected {
# which apps need to be installed? # which apps need to be installed?
select_all_apps=$1
installs="" installs=""
app_index=0 app_index=0
n=0 n=0
@ -155,16 +156,18 @@ function install_apps_selected {
return return
fi fi
# ask for confirmation if [[ "$select_all_apps" != "add-all" ]]; then
dialog --title $"Remove applications" \ # ask for confirmation
--backtitle $"Freedombone" \ dialog --title $"Remove applications" \
--defaultno \ --backtitle $"Freedombone" \
--yesno $"\nYou have chosen to install $n apps.\n\n $installs\n\nIf you choose 'yes' then these will now be installed.\n\nAre you sure that you wish to continue?" 15 60 --defaultno \
sel=$? --yesno $"\nYou have chosen to install $n apps.\n\n $installs\n\nIf you choose 'yes' then these will now be installed.\n\nAre you sure that you wish to continue?" 15 60
case $sel in sel=$?
1) return;; case $sel in
255) return;; 1) return;;
esac 255) return;;
esac
fi
clear clear