bazzite/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install

31 lines
920 B
Bash
Executable File

#!/usr/bin/env bash
source /etc/default/bazzite
if grep -qz 'fedora' <<< $(flatpak remotes); then
/usr/lib/fedora-third-party/fedora-third-party-opt-out
/usr/bin/fedora-third-party disable
fi
if [[ -f '/etc/flatpak/install' ]]; then
cat /etc/flatpak/install | while read line; do
flatpak install --system --noninteractive flathub $line
done && mv /etc/flatpak/install /etc/flatpak/installed
fi
if [[ -f '/etc/flatpak/remove' ]]; then
cat /etc/flatpak/remove | while read line; do
flatpak remove --system --noninteractive $line 2>/dev/null
done
mv /etc/flatpak/remove /etc/flatpak/removed
fi
if [[ -f '/etc/flatpak/deck' ]]; then
if [[ ${IMAGE_NAME} == *'deck'* ]]; then
cat /etc/flatpak/deck | while read line; do
flatpak install --system --noninteractive flathub $line
done && cat /etc/flatpak/deck >> /etc/flatpak/installed
fi
fi
rm -rf /etc/flatpak/{deck,flathub,objects}