Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Aug 22, 2024
2 parents 6cfc412 + c8bc726 commit 2215dfd
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions system_files/deck/shared/usr/libexec/os-branch-select
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
#!/usr/bin/bash
set -e

source /etc/os-release

if [[ $# -eq 1 ]]; then
case "$1" in
"-c")
-c)
if [[ -f /var/ublue-update/branch ]]; then
branch=$(cat /var/ublue-update/branch)
else
branch=$(cut -d ":" -f4 <<< "$(rpm-ostree status | grep -m 1 'bazzite')")
branch=$(cut -d ":" -f4 <<< "$(rpm-ostree status --booted | grep -m 1 $VARIANT_ID)")
fi

branch=${branch,,}
case "$branch" in
"latest" | "stable")
# Trim and convert to lowercase
branch=$(echo "$branch" | tr '[:upper:]' '[:lower:]' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
case $branch in
latest|stable)
echo rel
exit 0
;;
"testing")
testing)
echo rc
exit 0
;;
"unstable")
unstable)
echo main
exit 0
;;
Expand All @@ -33,23 +36,23 @@ if [[ $# -eq 1 ]]; then
;;
esac
;;
"-l")
-l)
echo rel
echo rc
echo beta
echo bc
echo main
exit 0
;;
"rel" | "latest" | "stable")
rel|latest|stable)
/usr/bin/pkexec /usr/libexec/ublue-update-rebase "stable"
exit 0
;;
"rc" | "beta" | "testing")
rc|beta|testing)
/usr/bin/pkexec /usr/libexec/ublue-update-rebase "testing"
exit 0
;;
"bc" | "main" | "unstable")
bc|main|unstable)
echo "The unstable branch has a high risk of breaking."
echo "Do NOT use it unless you know what you are doing."
/usr/bin/pkexec /usr/libexec/ublue-update-rebase "unstable"
Expand Down

0 comments on commit 2215dfd

Please sign in to comment.