Skip to content

Commit

Permalink
fix: Ensure flathub repo is always installed by watching file in /usr…
Browse files Browse the repository at this point in the history
…/etc instead of /etc

fix: Set priority of user flathub repo so it's always used over the system one by the end-user.
  • Loading branch information
KyleGospo committed Jan 30, 2024
1 parent 0a88a21 commit 52c2154
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion usr/bin/ublue-system-flatpak-manager
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Script Version
VER=2
VER=3
VER_FILE="/etc/ublue/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

Expand All @@ -19,6 +19,7 @@ if grep -qz 'fedora' <<< $(flatpak remotes); then
fi

# Ensure Flathub is enabled
flatpak remote-add --if-not-exists --system flathub /usr/etc/flatpak/remotes.d/flathub.flatpakrepo
flatpak remote-modify --system --enable flathub

# Lists of flatpaks
Expand Down
6 changes: 3 additions & 3 deletions usr/bin/ublue-user-flatpak-manager
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Script Version
VER=2
VER=3
VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/ublue/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

Expand All @@ -27,8 +27,8 @@ fi
if grep -qz 'fedora' <<< $(flatpak remotes); then
flatpak remote-delete --user fedora --force
fi
flatpak remote-add --if-not-exists --user flathub /etc/flatpak/remotes.d/flathub.flatpakrepo
flatpak remote-modify --user --enable flathub
flatpak remote-add --if-not-exists --user flathub /usr/etc/flatpak/remotes.d/flathub.flatpakrepo
flatpak remote-modify --user --enable --prio=2 flathub

# Lists of flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
Expand Down

0 comments on commit 52c2154

Please sign in to comment.