Tidying
This commit is contained in:
parent
ddb9b7a353
commit
fcb209d3a9
|
@ -108,19 +108,17 @@ function show_apps {
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
for a in ${APPS_AVAILABLE[@]}
|
for a in ${APPS_AVAILABLE[@]}
|
||||||
do
|
do
|
||||||
if [[ $(app_not_on_onion_only "$a") != "0" ]]; then
|
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"
|
||||||
|
else
|
||||||
|
if [[ $(app_expected_to_be_installed "$select_all_apps" "$a") == "0" ]]; then
|
||||||
applist="$applist $n $a off"
|
applist="$applist $n $a off"
|
||||||
else
|
else
|
||||||
if [[ $(app_expected_to_be_installed "$select_all_apps" "$a") == "0" ]]; then
|
applist="$applist $n $a on"
|
||||||
applist="$applist $n $a off"
|
|
||||||
else
|
|
||||||
applist="$applist $n $a on"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
n=$((n+1))
|
|
||||||
app_index=$((app_index+1))
|
|
||||||
fi
|
fi
|
||||||
|
n=$((n+1))
|
||||||
|
app_index=$((app_index+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -149,19 +147,17 @@ function remove_apps_selected {
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
for a in ${APPS_INSTALLED[@]}
|
for a in ${APPS_INSTALLED[@]}
|
||||||
do
|
do
|
||||||
if [[ $(app_not_on_onion_only "$a") != "0" ]]; then
|
if [[ ${APPS_INSTALLED[$app_index]} == "1" ]]; then
|
||||||
if [[ ${APPS_INSTALLED[$app_index]} == "1" ]]; then
|
if [[ ${APPS_CHOSEN[$app_index]} == "0" ]]; then
|
||||||
if [[ ${APPS_CHOSEN[$app_index]} == "0" ]]; then
|
if [ ${n} -gt 0 ]; then
|
||||||
if [ ${n} -gt 0 ]; then
|
removals="$removals ${APPS_AVAILABLE[$app_index]}"
|
||||||
removals="$removals ${APPS_AVAILABLE[$app_index]}"
|
else
|
||||||
else
|
removals="${APPS_AVAILABLE[$app_index]}"
|
||||||
removals="${APPS_AVAILABLE[$app_index]}"
|
|
||||||
fi
|
|
||||||
n=$((n+1))
|
|
||||||
fi
|
fi
|
||||||
|
n=$((n+1))
|
||||||
fi
|
fi
|
||||||
app_index=$((app_index+1))
|
|
||||||
fi
|
fi
|
||||||
|
app_index=$((app_index+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
# if no apps to be removed then don't do anything
|
# if no apps to be removed then don't do anything
|
||||||
|
@ -196,19 +192,18 @@ function install_apps_selected {
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
for a in ${APPS_INSTALLED[@]}
|
for a in ${APPS_INSTALLED[@]}
|
||||||
do
|
do
|
||||||
if [[ $(app_not_on_onion_only "$a") != "0" ]]; then
|
if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
|
||||||
if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
|
if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
|
||||||
if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
|
if [ ${n} -gt 0 ]; then
|
||||||
if [ ${n} -gt 0 ]; then
|
installs="$installs ${APPS_AVAILABLE[$app_index]}"
|
||||||
installs="$installs ${APPS_AVAILABLE[$app_index]}"
|
else
|
||||||
else
|
installs="${APPS_AVAILABLE[$app_index]}"
|
||||||
installs="${APPS_AVAILABLE[$app_index]}"
|
|
||||||
fi
|
|
||||||
n=$((n+1))
|
|
||||||
fi
|
fi
|
||||||
|
n=$((n+1))
|
||||||
fi
|
fi
|
||||||
app_index=$((app_index+1))
|
|
||||||
fi
|
fi
|
||||||
|
app_index=$((app_index+1))
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# if no apps to be installed then don't do anything
|
# if no apps to be installed then don't do anything
|
||||||
|
|
Loading…
Reference in New Issue