bazzite/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install
RJ Trujillo 04a6a588aa
fix(flatpak): Locally install Flathub repo and fix Fedora repo removal (#126)
* fix(user-setup): Locally install Flathub repo

This uses the existing Flathub repo file in /etc/flatpak/remotes.d so that it can be added completely offline

* chore(flatpak-system-install): Remove Fedora system flatpakrepo
2023-08-09 15:50:35 +00:00

32 lines
959 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
flatpak remote-delete fedora --force
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}