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

27 lines
916 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
source /etc/default/bazzite
if [[ -f '/etc/flatpak/install' ]]; then
cp -r /etc/flatpak/flathub/* /var/lib/flatpak/repo/refs/remotes/flathub
2023-07-31 20:45:36 -06:00
cp -r /etc/flatpak/objects/* /var/lib/flatpak/repo/objects
cat /etc/flatpak/install | while read line; do
flatpak install --system --noninteractive --no-pull 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
done && mv /etc/flatpak/install /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 --no-pull flathub $line
done && cat /etc/flatpak/deck >> /etc/flatpak/installed
fi
fi
rm -rf /etc/flatpak/{deck,flathub,objects}