Skip to content

Commit

Permalink
chore(default-flatpaks): Use 1 for/done loop instead of 2 for user re…
Browse files Browse the repository at this point in the history
…mote logic
  • Loading branch information
fiftydinar authored Oct 14, 2024
1 parent caed9c2 commit 5755607
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions modules/default-flatpaks/v1/system-flatpak-setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# Opt out of and remove Fedora's system flatpak repos
FLATPAK_SYSTEM_REMOTES=($(flatpak --system remotes))

fedora_system=false
fedora_testing_system=false

for system_remote in "${FLATPAK_SYSTEM_REMOTES[@]}"; do
if [[ "${system_remote}" == "fedora" ]]; then
fedora_system=true
fi
done
for system_remote in "${FLATPAK_SYSTEM_REMOTES[@]}"; do
if [[ "${system_remote}" == "fedora-testing" ]]; then
elif [[ "${system_remote}" == "fedora-testing" ]]; then
fedora_testing_system=true
fi
fi
done

if rpm -q fedora-third-party &>/dev/null; then
Expand Down
10 changes: 5 additions & 5 deletions modules/default-flatpaks/v1/user-flatpak-setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# Remove Fedora's flatpak user repos, if they exist
FLATPAK_USER_REMOTES=($(flatpak --user remotes))

fedora_user=false
fedora_testing_user=false

for user_remote in "${FLATPAK_USER_REMOTES[@]}"; do
if [[ "${user_remote}" == "fedora" ]]; then
fedora_user=true
fi
done
for user_remote in "${FLATPAK_USER_REMOTES[@]}"; do
if [[ "${user_remote}" == "fedora-testing" ]]; then
fedora_user=true
elif [[ "${user_remote}" == "fedora-testing" ]]; then
fedora_testing_user=true
fi
done
Expand Down

0 comments on commit 5755607

Please sign in to comment.