bazzite/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install
RJ Trujillo 56938e2c24
fix: Remove flatpak caching, use network connection instead (#110)
* fix: Stop caching flatpaks

These take up way too much space in images

* fix(flatpak-system-install): Require network connection

* fix(flatpak-system-install): Restart on failure

* fix(gnome): Add Silverblue flatpaks to install list

* fix(flatpak-system-install): Silence errors on package removal

A package may not be removed for a number of reasons, for example if someone were
to rebase from Kinoite to Bazzite GNOME, they wouldn't have the GNOME app suite
installed from Silverblue

* fix(deck): Don't try to install cached system flatpaks
2023-08-06 20:02:52 +00:00

26 lines
771 B
Bash
Executable File

#!/usr/bin/env bash
source /etc/default/bazzite
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}