fix: steamify-install passes --options (Steamify 2.7.0 dropped --skip); TODO: the Steamify page passes the ticked ids, build in the test VM

This commit is contained in:
theupriser committed 2026-09-28 10:08:19 +02:00
1 parent 9deb00708c
commit 63b1a769d5
2 files changed
+12 -2

No files matched your search

@@ -1,6 +1,6 @@
# Steamify: which parts of the Steam Machine setup to leave out. Nothing # Steamify: which parts of the Steam Machine setup to leave out. Nothing
# selected means Steamify's full default setup; the ids are Steamify's menu # selected means Steamify's full default setup; the ids are Steamify's menu
# items (steamify-install passes them as --skip). # items (steamify-install passes the others as --options).
--- ---
mode: optionalmultiple mode: optionalmultiple
method: legacy method: legacy
@@ -11,6 +11,16 @@ root="$1" user="$2"
# The pages' ids, comma-separated; the "Everything" entry is an empty id. # The pages' ids, comma-separated; the "Everything" entry is an empty id.
skip="$(tr ',' '\n' <<< "${3:-}" | grep -v '^$' | paste -sd, -)" skip="$(tr ',' '\n' <<< "${3:-}" | grep -v '^$' | paste -sd, -)"
boot="${4:-gamescope}" boot="${4:-gamescope}"
# Steamify 2.7.0 takes the items to turn on (--options), not the ones to
# leave out: every item of the default setup minus the skipped ones (the
# power-off fix goes with Steam Machine support). Until the Steamify page
# passes the "on" list itself.
options=""
for id in gaming theme glyphs single launcher notify vram cec machine poweroff; do
[[ ",$skip," == *",$id,"* ]] && continue
[[ "$id" == poweroff && ",$skip," == *",machine,"* ]] && continue
options+="${options:+,}$id"
done
log="$root/var/log/steamify-install.log" log="$root/var/log/steamify-install.log"
rule="$root/etc/sudoers.d/zz-steamify-install" rule="$root/etc/sudoers.d/zz-steamify-install"
[[ -d "$root" && -n "$user" ]] || exit 0 [[ -d "$root" && -n "$user" ]] || exit 0
@@ -20,7 +30,7 @@ printf '%s ALL=(ALL) NOPASSWD: ALL\n' "$user" > "$rule"
chmod 440 "$rule" chmod 440 "$rule"
arch-chroot "$root" runuser -u "$user" -- env -i HOME="/home/$user" USER="$user" LOGNAME="$user" \ arch-chroot "$root" runuser -u "$user" -- env -i HOME="/home/$user" USER="$user" LOGNAME="$user" \
PATH=/usr/local/bin:/usr/bin TERM=dumb LANG=C.UTF-8 \ PATH=/usr/local/bin:/usr/bin TERM=dumb LANG=C.UTF-8 \
bash -c 'cd ~ && bash /var/tmp/steamify.sh --defaults --skip "$0" --boot "$1" < /dev/null' "$skip" "$boot" > "$log" 2>&1 bash -c 'cd ~ && bash /var/tmp/steamify.sh --defaults --options "$0" --boot "$1" < /dev/null' "$options" "$boot" > "$log" 2>&1
echo "exit: $?" >> "$log" echo "exit: $?" >> "$log"
rm -f "$rule" "$root/var/tmp/steamify.sh" rm -f "$rule" "$root/var/tmp/steamify.sh"
exit 0 exit 0