Mark initial removed apps
This commit is contained in:
parent
d067de37d9
commit
b7de2bacec
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue