浏览代码

Remove redundant function

Bob Mottram 7 年前
父节点
当前提交
ddb9b7a353
共有 2 个文件被更改,包括 14 次插入28 次删除
  1. 0
    14
      src/freedombone-addremove
  2. 14
    14
      src/freedombone-utils-selector

+ 0
- 14
src/freedombone-addremove 查看文件

80
     done
80
     done
81
 }
81
 }
82
 
82
 
83
-function app_not_on_onion_only {
84
-    app_name="$1"
85
-
86
-    read_config_param ONION_ONLY
87
-
88
-    if [[ "$ONION_ONLY" != 'no' ]]; then
89
-        if grep -q "NOT_ON_ONION=1" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"; then
90
-            echo "0"
91
-            return
92
-        fi
93
-    fi
94
-    echo "1"
95
-}
96
-
97
 function app_expected_to_be_installed {
83
 function app_expected_to_be_installed {
98
     # is the given application expected to be installed by default?
84
     # is the given application expected to be installed by default?
99
     select_all_apps="$1"
85
     select_all_apps="$1"

+ 14
- 14
src/freedombone-utils-selector 查看文件

272
     done
272
     done
273
 }
273
 }
274
 
274
 
275
+function app_not_on_onion_only {
276
+    app_name="$1"
277
+
278
+    read_config_param ONION_ONLY
279
+
280
+    if [[ "$ONION_ONLY" != 'no' ]]; then
281
+        if grep -q "NOT_ON_ONION=1" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"; then
282
+            echo "0"
283
+            return
284
+        fi
285
+    fi
286
+    echo "1"
287
+}
288
+
275
 # detects what apps are available
289
 # detects what apps are available
276
 function detect_apps {
290
 function detect_apps {
277
     FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*"
291
     FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*"
299
     get_apps_installed_names
313
     get_apps_installed_names
300
 }
314
 }
301
 
315
 
302
-function app_not_on_onion_only {
303
-    app_name="$1"
304
-
305
-    read_config_param ONION_ONLY
306
-
307
-    if [[ "$ONION_ONLY" != 'no' ]]; then
308
-        if grep -q "NOT_ON_ONION=1" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"; then
309
-            echo "0"
310
-            return
311
-        fi
312
-    fi
313
-    echo "1"
314
-}
315
-
316
 # detects what apps are available and can be installed
316
 # detects what apps are available and can be installed
317
 # If the variants list within an app script is an empty string then
317
 # If the variants list within an app script is an empty string then
318
 # it is considered to be too experimental to be installable
318
 # it is considered to be too experimental to be installable