From 4321770ee53c8d95270d081cd6ad753de4c2f03e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 9 May 2018 17:41:37 +0100 Subject: [PATCH] Invert logic --- src/freedombone-app-matrix | 1 + src/freedombone-utils-selector | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 524914d4..3992238d 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -37,6 +37,7 @@ VARIANTS='full full-vim chat' IN_DEFAULT_INSTALL=0 SHOW_ON_ABOUT=1 NOT_ON_ONION=1 +MINIMUM_RAM_MB=1500 MATRIX_DOMAIN_NAME= MATRIX_CODE= diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index ec17f563..25ed118e 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -318,7 +318,7 @@ function detect_apps { for filename in $FILES do app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') - if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then + if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then # shellcheck disable=SC2068 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then @@ -354,7 +354,7 @@ function detect_installable_apps { do app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') - if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then + if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then # shellcheck disable=SC2068 if ! item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then @@ -390,7 +390,7 @@ function detect_installed_apps { do app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') - if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then + if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then if [[ $(app_is_installed "$app_name") == "1" ]]; then # shellcheck disable=SC2068 @@ -429,7 +429,7 @@ function choose_apps_for_variant { for filename in $FILES do app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') - if [[ $(enough_ram_for_app "$app_name") != "0" ]]; then + if [[ $(enough_ram_for_app "$app_name") == "0" ]]; then if [[ $(app_not_on_onion_only "$app_name") != "0" ]]; then # shellcheck disable=SC2068 if item_in_array "${app_name}" ${APPS_AVAILABLE[@]}; then