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