diff --git a/src/freedombone-addremove b/src/freedombone-addremove index c07beb9c..8a206a80 100755 --- a/src/freedombone-addremove +++ b/src/freedombone-addremove @@ -164,7 +164,7 @@ function install_apps_interactive { # install the apps read_configuration - install_apps + install_apps interactive } ${PROJECT_NAME}-tests diff --git a/src/freedombone-utils-depends b/src/freedombone-utils-depends index ceb19337..5207758d 100755 --- a/src/freedombone-utils-depends +++ b/src/freedombone-utils-depends @@ -30,10 +30,17 @@ function function_check { if [ ! "$(type ${1} 2>/dev/null)" ]; then - echo $"Dependency error: The function ${1} has not been defined" - exit 72528 + echo $"Dependency error: The function ${1} has not been defined" + exit 72528 fi } +function function_exists { + if [ ! "$(type ${1} 2>/dev/null)" ]; then + echo "0" + else + echo "1" + fi +} # NOTE: deliberately there is no "exit 0" diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index 1f11af87..c6518199 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -202,11 +202,18 @@ function remove_apps { } function install_apps { + is_interactive=$1 app_index=0 for a in "${APPS_AVAILABLE[@]}" do if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then + if [ ${is_interactive} ]; then + # interactively obtain settings for this app + if [[ $(function_exists install_interactive_${a}) == "1" ]]; then + install_interactive_${a} + fi + fi echo $"Installing application: ${a}" install_${a} echo $"${a} was installed"