Skip to content
Snippets Groups Projects
Commit a1a7e92d authored by Bob Mottram's avatar Bob Mottram
Browse files

Avoid bad app sequence

parent c98b2f2e
No related branches found
No related tags found
No related merge requests found
...@@ -163,14 +163,16 @@ function remove_apps_selected { ...@@ -163,14 +163,16 @@ function remove_apps_selected {
# shellcheck disable=SC2068 # shellcheck disable=SC2068
for a in ${APPS_INSTALLED[@]} for a in ${APPS_INSTALLED[@]}
do do
if [[ ${APPS_INSTALLED[$app_index]} == "1" ]]; then if [[ $(app_not_on_onion_only "$a") != "0" ]]; then
if [[ ${APPS_CHOSEN[$app_index]} == "0" ]]; then if [[ ${APPS_INSTALLED[$app_index]} == "1" ]]; then
if [ ${n} -gt 0 ]; then if [[ ${APPS_CHOSEN[$app_index]} == "0" ]]; then
removals="$removals ${APPS_AVAILABLE[$app_index]}" if [ ${n} -gt 0 ]; then
else removals="$removals ${APPS_AVAILABLE[$app_index]}"
removals="${APPS_AVAILABLE[$app_index]}" else
removals="${APPS_AVAILABLE[$app_index]}"
fi
n=$((n+1))
fi fi
n=$((n+1))
fi fi
fi fi
app_index=$((app_index+1)) app_index=$((app_index+1))
...@@ -208,14 +210,16 @@ function install_apps_selected { ...@@ -208,14 +210,16 @@ function install_apps_selected {
# shellcheck disable=SC2068 # shellcheck disable=SC2068
for a in ${APPS_INSTALLED[@]} for a in ${APPS_INSTALLED[@]}
do do
if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then if [[ $(app_not_on_onion_only "$a") != "0" ]]; then
if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
if [ ${n} -gt 0 ]; then if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
installs="$installs ${APPS_AVAILABLE[$app_index]}" if [ ${n} -gt 0 ]; then
else installs="$installs ${APPS_AVAILABLE[$app_index]}"
installs="${APPS_AVAILABLE[$app_index]}" else
installs="${APPS_AVAILABLE[$app_index]}"
fi
n=$((n+1))
fi fi
n=$((n+1))
fi fi
fi fi
app_index=$((app_index+1)) app_index=$((app_index+1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment