From 97fab178c6f214804f2b8b5e044e03ac2416feb0 Mon Sep 17 00:00:00 2001 From: Tulili Date: Fri, 25 Aug 2023 14:32:08 -0300 Subject: [PATCH] fix: make sure flatpak install script does not run if already installed --- .../desktop/shared/usr/bin/ublue-flatpak-system-install | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install b/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install index f27b053a..c0c6ddf2 100755 --- a/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install +++ b/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install @@ -1,6 +1,13 @@ #!/usr/bin/env bash source /etc/default/bazzite +FLATPAK_INSTALLED_CONDITION_CHECK="/etc/bazzite/sys_flatpak_configured" + +if [[ -f "$FLATPAK_INSTALLED_CONDITION_CHECK" ]] ; then + printf "System flatpaks are already installed (%s)" "$FLATPAK_INSTALLED_CONDITION_CHECK" + exit 0 +fi + if grep -qz 'fedora' <<< $(flatpak remotes); then /usr/lib/fedora-third-party/fedora-third-party-opt-out /usr/bin/fedora-third-party disable @@ -29,3 +36,5 @@ if [[ -f '/etc/flatpak/deck' ]]; then fi rm -rf /etc/flatpak/{deck,flathub,objects} +mkdir /etc/bazzite +touch "$FLATPAK_INSTALLED_CONDITION_CHECK"