瀏覽代碼

Only add confirmation if not installing for the first time

Bob Mottram 8 年之前
父節點
當前提交
0360845f71
共有 1 個檔案被更改,包括 13 行新增10 行删除
  1. 13
    10
      src/freedombone-addremove

+ 13
- 10
src/freedombone-addremove 查看文件

@@ -132,6 +132,7 @@ function remove_apps_selected {
132 132
 
133 133
 function install_apps_selected {
134 134
     # which apps need to be installed?
135
+    select_all_apps=$1
135 136
     installs=""
136 137
     app_index=0
137 138
     n=0
@@ -155,16 +156,18 @@ function install_apps_selected {
155 156
         return
156 157
     fi
157 158
 
158
-    # ask for confirmation
159
-    dialog --title $"Remove applications" \
160
-           --backtitle $"Freedombone" \
161
-           --defaultno \
162
-           --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
163
-    sel=$?
164
-    case $sel in
165
-        1) return;;
166
-        255) return;;
167
-    esac
159
+    if [[ "$select_all_apps" != "add-all" ]]; then
160
+        # ask for confirmation
161
+        dialog --title $"Remove applications" \
162
+               --backtitle $"Freedombone" \
163
+               --defaultno \
164
+               --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
165
+        sel=$?
166
+        case $sel in
167
+            1) return;;
168
+            255) return;;
169
+        esac
170
+    fi
168 171
 
169 172
     clear
170 173