mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-12-06 19:39:20 +01:00
[presets] add steamos files
This commit is contained in:
36
presets/steam/steamos/bin/steamos-select-branch
Executable file
36
presets/steam/steamos/bin/steamos-select-branch
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BRANCH_PATH="/var/lib/steamos-branch"
|
||||
|
||||
if [[ "$#" = 1 ]]; then
|
||||
case "$1" in
|
||||
"-c")
|
||||
branch=$(cat "$BRANCH_PATH" 2> /dev/null || echo "rel")
|
||||
case "$branch" in
|
||||
"rel" | "rc" | "beta" | "bc" | "main")
|
||||
echo "$branch"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "unknown branch name in $BRANCH_PATH: $branch" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"-l")
|
||||
echo rel
|
||||
echo rc
|
||||
echo beta
|
||||
echo bc
|
||||
echo main
|
||||
exit 0
|
||||
;;
|
||||
"rel" | "rc" | "beta" | "bc" | "main")
|
||||
echo "$1" > "$BRANCH_PATH"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "Usage: steamos-select-branch <-c|-l|rel|rc|beta|bc|main>" 1>&2
|
||||
Reference in New Issue
Block a user