浏览代码

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
 
132
 
133
 function install_apps_selected {
133
 function install_apps_selected {
134
     # which apps need to be installed?
134
     # which apps need to be installed?
135
+    select_all_apps=$1
135
     installs=""
136
     installs=""
136
     app_index=0
137
     app_index=0
137
     n=0
138
     n=0
155
         return
156
         return
156
     fi
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
     clear
172
     clear
170
 
173