Mark initial removed apps

This commit is contained in:
Bob Mottram 2016-10-19 19:26:12 +01:00
parent d067de37d9
commit b7de2bacec
1 changed files with 23 additions and 0 deletions

View File

@ -55,6 +55,28 @@ do
source $f
done
function mark_unselected_apps_as_removed {
# Initially mark the apps not selected on first install as being removed
# otherwise they may be automatically installed on the next update
select_all_apps=$1
if [[ "$select_all_apps" != "add-all" ]]; then
return
fi
if [ -f $REMOVED_APPS_FILE ]; then
rm $REMOVED_APPS_FILE
fi
app_index=0
for app_name in "${APPS_AVAILABLE[@]}"
do
if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
echo "_${app_name}_" >> $REMOVED_APPS_FILE
fi
app_index=$[app_index+1]
done
}
function show_apps {
select_all_apps=$1
applist=""
@ -199,6 +221,7 @@ if [[ ${#APPS_AVAILABLE[@]} == 0 ]]; then
fi
show_apps $1
mark_unselected_apps_as_removed $1
clear