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