From 0360845f7137e7fa352ff07176c5d026f033d585 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 17 Oct 2016 20:02:36 +0100 Subject: [PATCH] Only add confirmation if not installing for the first time --- src/freedombone-addremove | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/freedombone-addremove b/src/freedombone-addremove index bc695e63..6a7323ff 100755 --- a/src/freedombone-addremove +++ b/src/freedombone-addremove @@ -132,6 +132,7 @@ function remove_apps_selected { function install_apps_selected { # which apps need to be installed? + select_all_apps=$1 installs="" app_index=0 n=0 @@ -155,16 +156,18 @@ function install_apps_selected { return fi - # ask for confirmation - dialog --title $"Remove applications" \ - --backtitle $"Freedombone" \ - --defaultno \ - --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 - sel=$? - case $sel in - 1) return;; - 255) return;; - esac + if [[ "$select_all_apps" != "add-all" ]]; then + # ask for confirmation + dialog --title $"Remove applications" \ + --backtitle $"Freedombone" \ + --defaultno \ + --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 + sel=$? + case $sel in + 1) return;; + 255) return;; + esac + fi clear