Skip to content

Commit 97fab17

Browse files
author
Tulili
authored
fix: make sure flatpak install script does not run if already installed
1 parent 654a735 commit 97fab17

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/usr/bin/env bash
22
source /etc/default/bazzite
33

4+
FLATPAK_INSTALLED_CONDITION_CHECK="/etc/bazzite/sys_flatpak_configured"
5+
6+
if [[ -f "$FLATPAK_INSTALLED_CONDITION_CHECK" ]] ; then
7+
printf "System flatpaks are already installed (%s)" "$FLATPAK_INSTALLED_CONDITION_CHECK"
8+
exit 0
9+
fi
10+
411
if grep -qz 'fedora' <<< $(flatpak remotes); then
512
/usr/lib/fedora-third-party/fedora-third-party-opt-out
613
/usr/bin/fedora-third-party disable
@@ -29,3 +36,5 @@ if [[ -f '/etc/flatpak/deck' ]]; then
2936
fi
3037

3138
rm -rf /etc/flatpak/{deck,flathub,objects}
39+
mkdir /etc/bazzite
40+
touch "$FLATPAK_INSTALLED_CONDITION_CHECK"

0 commit comments

Comments
 (0)