From 5161fee8f663bf849d9659acfbe4452a63caf5ee Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@robotics.uk.to> Date: Mon, 17 Oct 2016 12:40:53 +0100 Subject: [PATCH] Initially select all apps for install in interactive mode --- src/freedombone-addremove | 4 ++++ src/freedombone-utils-selector | 10 ++++++++++ src/freedombone-utils-setup | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/freedombone-addremove b/src/freedombone-addremove index 377131f5c..85f876874 100755 --- a/src/freedombone-addremove +++ b/src/freedombone-addremove @@ -181,6 +181,10 @@ fi detect_installable_apps +if [[ $1 == "all"* ]]; then + choose_all_installable_apps +fi + # if no applications were found if [[ ${#APPS_AVAILABLE[@]} == 0 ]]; then exit 1 diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index 39f5dd531..157cc4338 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -316,6 +316,16 @@ function detect_installable_apps { done } +function choose_all_installable_apps { + # selects all of the apps + app_index=0 + for a in "${APPS_AVAILABLE[@]}" + do + APPS_CHOSEN[$app_index]="1" + app_index=$[app_index+1] + done +} + # creates the APPS_AVAILABLE and APPS_CHOSEN arrays based on # the given variant name function choose_apps_for_variant { diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 8bf65c5b0..af76fde16 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -535,7 +535,7 @@ function setup_apps { upgrade_apps if [[ $is_interactive == "menuconfig"* ]]; then - ${PROJECT_NAME}-addremove + ${PROJECT_NAME}-addremove all fi if [[ $is_interactive == "noninteractive" || $is_interactive == "headless" ]]; then -- GitLab