mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-18 04:10:16 +00:00
04a6a588aa
* 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
32 lines
959 B
Bash
Executable File
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}
|