Don't try to install hubzilla in onion only

This commit is contained in:
Bob Mottram 2016-10-19 20:29:43 +01:00
parent 9e556faa8f
commit 03b8a85f98
1 changed files with 21 additions and 1 deletions

View File

@ -77,6 +77,26 @@ function mark_unselected_apps_as_removed {
done done
} }
function app_expected_to_not_be_installed {
# is the given application expected to be installed by default?
select_all_apps="$1"
app_name="$2"
read_config_param ONION_ONLY
if [[ "$select_all_apps" == "add-all" ]]; then
if [[ "$app_name" == "vim" ]]; then
echo "1"
return
fi
if [[ $ONION_ONLY != 'no' && "$app_name" == "hubzilla" ]]; then
echo "1"
return
fi
fi
echo "0"
}
function show_apps { function show_apps {
select_all_apps=$1 select_all_apps=$1
applist="" applist=""
@ -87,7 +107,7 @@ function show_apps {
if [[ ${APPS_INSTALLED[$app_index]} == "0" && "$select_all_apps" != "add-all" ]]; then if [[ ${APPS_INSTALLED[$app_index]} == "0" && "$select_all_apps" != "add-all" ]]; then
applist="$applist $n $a off" applist="$applist $n $a off"
else else
if [[ "$a" == "vim" && "$select_all_apps" == "add-all" ]]; then if [[ $(app_expected_to_not_be_installed) == "1" ]]; then
applist="$applist $n $a off" applist="$applist $n $a off"
else else
applist="$applist $n $a on" applist="$applist $n $a on"