Browse Source

Function parameters

Bob Mottram 8 years ago
parent
commit
82b087c46a
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      src/freedombone-addremove

+ 5
- 5
src/freedombone-addremove View File

77
     done
77
     done
78
 }
78
 }
79
 
79
 
80
-function app_expected_to_not_be_installed {
80
+function app_expected_to_be_installed {
81
     # is the given application expected to be installed by default?
81
     # is the given application expected to be installed by default?
82
     select_all_apps="$1"
82
     select_all_apps="$1"
83
     app_name="$2"
83
     app_name="$2"
86
 
86
 
87
     if [[ "$select_all_apps" == "add-all" ]]; then
87
     if [[ "$select_all_apps" == "add-all" ]]; then
88
         if [[ "$app_name" == "vim"  ]]; then
88
         if [[ "$app_name" == "vim"  ]]; then
89
-            echo "1"
89
+            echo "0"
90
             return
90
             return
91
         fi
91
         fi
92
         if [[ $ONION_ONLY != 'no' && "$app_name" == "hubzilla"  ]]; then
92
         if [[ $ONION_ONLY != 'no' && "$app_name" == "hubzilla"  ]]; then
93
-            echo "1"
93
+            echo "0"
94
             return
94
             return
95
         fi
95
         fi
96
     fi
96
     fi
97
-    echo "0"
97
+    echo "1"
98
 }
98
 }
99
 
99
 
100
 function show_apps {
100
 function show_apps {
107
         if [[ ${APPS_INSTALLED[$app_index]} == "0" &&  "$select_all_apps" != "add-all" ]]; then
107
         if [[ ${APPS_INSTALLED[$app_index]} == "0" &&  "$select_all_apps" != "add-all" ]]; then
108
             applist="$applist $n $a off"
108
             applist="$applist $n $a off"
109
         else
109
         else
110
-            if [[ $(app_expected_to_not_be_installed) == "1" ]]; then
110
+            if [[ $(app_expected_to_be_installed "$select_all_apps" "$a") == "0" ]]; then
111
                 applist="$applist $n $a off"
111
                 applist="$applist $n $a off"
112
             else
112
             else
113
                 applist="$applist $n $a on"
113
                 applist="$applist $n $a on"