Bladeren bron

Fix dialog arguments

Bob Mottram 7 jaren geleden
bovenliggende
commit
8c75814291
4 gewijzigde bestanden met toevoegingen van 23 en 12 verwijderingen
  1. 3
    2
      src/freedombone-addremove
  2. 4
    2
      src/freedombone-config
  3. 12
    6
      src/freedombone-controlpanel
  4. 4
    2
      src/freedombone-controlpanel-user

+ 3
- 2
src/freedombone-addremove Bestand weergeven

121
         app_index=$((app_index+1))
121
         app_index=$((app_index+1))
122
     done
122
     done
123
 
123
 
124
+    # shellcheck disable=SC2086
124
     choices=$(dialog --stdout --backtitle $"Freedombone" \
125
     choices=$(dialog --stdout --backtitle $"Freedombone" \
125
                      --title $"Add/Remove Applications" \
126
                      --title $"Add/Remove Applications" \
126
                      --checklist $'Choose:' \
127
                      --checklist $'Choose:' \
127
-                     27 40 20 "$applist")
128
+                     27 40 20 $applist)
128
 
129
 
129
     # shellcheck disable=SC2181
130
     # shellcheck disable=SC2181
130
     if [ $? -eq 0 ]; then
131
     if [ $? -eq 0 ]; then
258
 
259
 
259
 remove_apps_selected
260
 remove_apps_selected
260
 
261
 
261
-if [[ $1 == "add-all" ]]; then
262
+if [[ "$1" == "add-all" ]]; then
262
     install_apps_selected add-all
263
     install_apps_selected add-all
263
 else
264
 else
264
     install_apps_selected
265
     install_apps_selected

+ 4
- 2
src/freedombone-config Bestand weergeven

808
         n=$((n+1))
808
         n=$((n+1))
809
     done
809
     done
810
 
810
 
811
+    # shellcheck disable=SC2086
811
     variant_choice=$(dialog --stdout --backtitle $"Freedombone Configuration" \
812
     variant_choice=$(dialog --stdout --backtitle $"Freedombone Configuration" \
812
                             --title $"Type of Installation" \
813
                             --title $"Type of Installation" \
813
                             --radiolist $'Choose:' \
814
                             --radiolist $'Choose:' \
814
-                            27 40 20 "$varslist")
815
+                            27 40 20 $varslist)
815
 
816
 
816
     # shellcheck disable=SC2181
817
     # shellcheck disable=SC2181
817
     if [ $? -eq 0 ]; then
818
     if [ $? -eq 0 ]; then
1078
     if [ $i -eq 1 ]; then
1079
     if [ $i -eq 1 ]; then
1079
         SELECTED_USERNAME="${name[0]}"
1080
         SELECTED_USERNAME="${name[0]}"
1080
     else
1081
     else
1081
-        user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
1082
+        # shellcheck disable=SC2068
1083
+        user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
1082
 
1084
 
1083
         # shellcheck disable=SC2181
1085
         # shellcheck disable=SC2181
1084
         if [ $? -eq 0 ]; then
1086
         if [ $? -eq 0 ]; then

+ 12
- 6
src/freedombone-controlpanel Bestand weergeven

215
     if [ $i -eq 1 ]; then
215
     if [ $i -eq 1 ]; then
216
         SELECTED_USERNAME="${name[0]}"
216
         SELECTED_USERNAME="${name[0]}"
217
     else
217
     else
218
-        user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
218
+        # shellcheck disable=SC2068
219
+        user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
219
 
220
 
220
         # shellcheck disable=SC2181
221
         # shellcheck disable=SC2181
221
         if [ $? -eq 0 ]; then
222
         if [ $? -eq 0 ]; then
241
     W+=("$i" "mariadb")
242
     W+=("$i" "mariadb")
242
     name+=("mariadb")
243
     name+=("mariadb")
243
 
244
 
244
-    selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
245
+    # shellcheck disable=SC2068
246
+    selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
245
 
247
 
246
     # shellcheck disable=SC2181
248
     # shellcheck disable=SC2181
247
     if [ $? -eq 0 ]; then
249
     if [ $? -eq 0 ]; then
617
     if [ $i -eq 1 ]; then
619
     if [ $i -eq 1 ]; then
618
         SELECTED_USERNAME="${name[0]}"
620
         SELECTED_USERNAME="${name[0]}"
619
     else
621
     else
620
-        user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
622
+        # shellcheck disable=SC2068
623
+        user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
621
 
624
 
622
         # shellcheck disable=SC2181
625
         # shellcheck disable=SC2181
623
         if [ $? -eq 0 ]; then
626
         if [ $? -eq 0 ]; then
762
     i=$((i+1))
765
     i=$((i+1))
763
     W+=("$i" $"Exit back to user mainenance")
766
     W+=("$i" $"Exit back to user mainenance")
764
 
767
 
765
-    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone Control Panel" --title $"Remove a mailing list for $SELECTED_USERNAME" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
768
+    # shellcheck disable=SC2068
769
+    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone Control Panel" --title $"Remove a mailing list for $SELECTED_USERNAME" --menu $"Select one of the following:" 24 50 17 ${W[@]} 3>&2 2>&1 1>&3)
766
 
770
 
767
     # shellcheck disable=SC2181
771
     # shellcheck disable=SC2181
768
     if [ $? -eq 0 ]; then # Exit with OK
772
     if [ $? -eq 0 ]; then # Exit with OK
1147
         n=$((n+1))
1151
         n=$((n+1))
1148
         app_list+=("$ExitStr")
1152
         app_list+=("$ExitStr")
1149
 
1153
 
1154
+        # shellcheck disable=SC2086
1150
         choice=$(dialog --stdout --backtitle $"Freedombone" \
1155
         choice=$(dialog --stdout --backtitle $"Freedombone" \
1151
                         --title "$RestoreStr" \
1156
                         --title "$RestoreStr" \
1152
                         --radiolist $'Choose:' \
1157
                         --radiolist $'Choose:' \
1153
-                        30 50 20 "$applist")
1158
+                        30 50 20 $applist)
1154
 
1159
 
1155
         # shellcheck disable=SC2181
1160
         # shellcheck disable=SC2181
1156
         if [ $? -ne 0 ]; then
1161
         if [ $? -ne 0 ]; then
2246
     applist="$applist $n $backstr on"
2251
     applist="$applist $n $backstr on"
2247
     appnames+=("Exit")
2252
     appnames+=("Exit")
2248
 
2253
 
2254
+    # shellcheck disable=SC2086
2249
     choice=$(dialog --stdout --backtitle $"Freedombone" \
2255
     choice=$(dialog --stdout --backtitle $"Freedombone" \
2250
                     --title $"Change settings for an App" \
2256
                     --title $"Change settings for an App" \
2251
                     --radiolist $'Choose:' \
2257
                     --radiolist $'Choose:' \
2252
-                    26 40 30 "$applist")
2258
+                    26 40 30 $applist)
2253
 
2259
 
2254
     # shellcheck disable=SC2181
2260
     # shellcheck disable=SC2181
2255
     if [ $? -eq 0 ]; then
2261
     if [ $? -eq 0 ]; then

+ 4
- 2
src/freedombone-controlpanel-user Bestand weergeven

91
     i=$((i+1))
91
     i=$((i+1))
92
     W+=("$i" $"Exit back to filtering rules menu")
92
     W+=("$i" $"Exit back to filtering rules menu")
93
 
93
 
94
-    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove yourself from a mailing list" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
94
+    # shellcheck disable=SC2068
95
+    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove yourself from a mailing list" --menu $"Select one of the following:" 24 50 17 ${W[@]} 3>&2 2>&1 1>&3)
95
 
96
 
96
     # shellcheck disable=SC2181
97
     # shellcheck disable=SC2181
97
     if [ $? -eq 0 ]; then # Exit with OK
98
     if [ $? -eq 0 ]; then # Exit with OK
854
     applist="$applist $n $backstr on"
855
     applist="$applist $n $backstr on"
855
     appnames+=("Exit")
856
     appnames+=("Exit")
856
 
857
 
858
+    # shellcheck disable=SC2086
857
     choice=$(dialog --stdout --backtitle $"Freedombone" \
859
     choice=$(dialog --stdout --backtitle $"Freedombone" \
858
                      --title $"Run an App" \
860
                      --title $"Run an App" \
859
                      --radiolist $'Choose:' \
861
                      --radiolist $'Choose:' \
860
-                     16 40 20 "$applist")
862
+                     16 40 20 $applist)
861
 
863
 
862
     # shellcheck disable=SC2181
864
     # shellcheck disable=SC2181
863
     if [ $? -eq 0 ]; then
865
     if [ $? -eq 0 ]; then