mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-17 10:13:00 +00:00
Revert "fix(flatpak-manager): Don't install packages that are already present or remove packages that aren't there"
This reverts commit 9deec489a0
.
This commit is contained in:
parent
f5f5329e35
commit
180eb8f7b6
@ -21,30 +21,22 @@ fi
|
||||
# Ensure Flathub is enabled
|
||||
flatpak remote-modify --system --enable flathub
|
||||
|
||||
# Installed flatpaks
|
||||
# Lists of flatpaks
|
||||
FLATPAK_LIST=$(flatpak list --columns=application)
|
||||
|
||||
# Flatpak list files
|
||||
INSTALL_LIST_FILE="/usr/share/ublue-os/bazzite/flatpak/install"
|
||||
REMOVE_LIST_FILE="/usr/share/ublue-os/bazzite/flatpak/remove"
|
||||
INSTALL_LIST=$(cat /usr/share/ublue-os/bazzite/flatpak/install)
|
||||
REMOVE_LIST=$(cat /usr/share/ublue-os/bazzite/flatpak/remove)
|
||||
|
||||
# Install flatpaks in list
|
||||
if [[ -f $INSTALL_LIST_FILE ]]; then
|
||||
INSTALL_LIST=$(echo $FLATPAK_LIST | grep -vf - $INSTALL_LIST_FILE)
|
||||
if [[ -n $INSTALL_LIST ]]; then
|
||||
if ! flatpak install --system --noninteractive flathub ${INSTALL_LIST[@]}; then
|
||||
# exit on error
|
||||
exit 1
|
||||
fi
|
||||
if [[ -n $INSTALL_LIST ]]; then
|
||||
if ! flatpak install --system --noninteractive flathub ${INSTALL_LIST[@]}; then
|
||||
# exit on error
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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[@]}
|
||||
fi
|
||||
if [[ ! -f $VER_FILE && -n $REMOVE_LIST ]]; then
|
||||
flatpak remove --system --noninteractive ${REMOVE_LIST[@]}
|
||||
fi
|
||||
|
||||
mkdir -p /etc/bazzite
|
||||
|
Loading…
Reference in New Issue
Block a user