chore(flatpak-manager): Only remove flatpaks a single time

Someone may choose to install a flatpak on the removal list intentionally, in which
case we don't want to forcibly remove it

This verifies the version file exists following a successful run and skips the removal
process if it does
This commit is contained in:
RJ Trujillo 2023-12-16 07:44:21 -07:00
parent 07995706ae
commit 69ccbdea5a

View File

@ -39,8 +39,8 @@ if [[ -f $INSTALL_LIST_FILE ]]; then
fi
fi
# Remove flatpaks in list
if [[ -f $REMOVE_LIST_FILE ]]; then
# Remove flatpaks in list once
if [[ ! -f $VER_FILE && -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo $FLATPAK_LIST | grep -f - $REMOVE_LIST_FILE)
if [[ -n $REMOVE_LIST ]]; then
flatpak remove --system --noninteractive ${REMOVE_LIST[@]}