Browse Source

Invert logic

Bob Mottram 6 years ago
parent
commit
4321770ee5
2 changed files with 5 additions and 4 deletions
  1. 1
    0
      src/freedombone-app-matrix
  2. 4
    4
      src/freedombone-utils-selector

+ 1
- 0
src/freedombone-app-matrix View File

37
 IN_DEFAULT_INSTALL=0
37
 IN_DEFAULT_INSTALL=0
38
 SHOW_ON_ABOUT=1
38
 SHOW_ON_ABOUT=1
39
 NOT_ON_ONION=1
39
 NOT_ON_ONION=1
40
+MINIMUM_RAM_MB=1500
40
 
41
 
41
 MATRIX_DOMAIN_NAME=
42
 MATRIX_DOMAIN_NAME=
42
 MATRIX_CODE=
43
 MATRIX_CODE=

+ 4
- 4
src/freedombone-utils-selector View File

318
     for filename in $FILES
318
     for filename in $FILES
319
     do
319
     do
320
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
320
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
321
-        if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then
321
+        if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then
322
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
322
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
323
                 # shellcheck disable=SC2068
323
                 # shellcheck disable=SC2068
324
                 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then
324
                 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then
354
     do
354
     do
355
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
355
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
356
 
356
 
357
-        if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then
357
+        if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then
358
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
358
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
359
                 # shellcheck disable=SC2068
359
                 # shellcheck disable=SC2068
360
                 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then
360
                 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then
390
     do
390
     do
391
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
391
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
392
 
392
 
393
-        if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then
393
+        if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then
394
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
394
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
395
                 if [[ $(app_is_installed "$app_name") == "1" ]]; then
395
                 if [[ $(app_is_installed "$app_name") == "1" ]]; then
396
                     # shellcheck disable=SC2068
396
                     # shellcheck disable=SC2068
429
     for filename in $FILES
429
     for filename in $FILES
430
     do
430
     do
431
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
431
         app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
432
-        if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then
432
+        if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then
433
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
433
             if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then
434
                 # shellcheck disable=SC2068
434
                 # shellcheck disable=SC2068
435
                 if item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then
435
                 if item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then