diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:16:12 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:16:12 +0800 |
| commit | 47ede79dece8e8e04f8105c8f2ef9c8883d9c738 (patch) | |
| tree | 5ce2d5c0642b73eeaf50f6e108e67ba7a65dc0ba /build_files | |
| parent | f068acf3b1c2a4551c5119997fd40909ddd35386 (diff) | |
| download | AeroCore-OS-47ede79dece8e8e04f8105c8f2ef9c8883d9c738.tar.gz AeroCore-OS-47ede79dece8e8e04f8105c8f2ef9c8883d9c738.zip | |
Revert "Run shortcut migration before setup guard"
This reverts commit f068acf3b1c2a4551c5119997fd40909ddd35386.
Diffstat (limited to 'build_files')
| -rwxr-xr-x | build_files/patch-bazzite-deck-identity.sh | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 8ddacf9..da2a74e 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -161,8 +161,6 @@ patch_desktop_branding_migration() { patch_gamemode_shortcut_migration() { local file="$1" local marker='AeroCore Return to Gaming Mode shortcut migration' - local insertion='# Run script if updated' - local patched_file if [[ ! -f "$file" ]]; then echo "Unable to locate expected Bazzite user setup file: $file" >&2 @@ -173,28 +171,14 @@ patch_gamemode_shortcut_migration() { return 0 fi - if [[ "$(grep -Foc "$insertion" "$file" || true)" -ne 1 ]]; then - echo "Unable to locate the Bazzite user setup version guard in $file" >&2 - exit 1 - fi + cat >> "$file" <<'EOF' - patched_file="$(mktemp)" - awk -v insertion="$insertion" ' - !inserted && $0 == insertion { - print "# AeroCore Return to Gaming Mode shortcut migration" - print "# Replace the legacy privileged systemd launcher left by older Bazzite images." - print "if [[ -f \"$HOME/Desktop/Return.desktop\" ]]; then" - print " sed -i '\''s|^Exec=systemctl start return-to-gamemode\\.service$|Exec=/usr/bin/return-to-gamemode|'\'' \"$HOME/Desktop/Return.desktop\"" - print "fi" - print "" - inserted=1 - } - { print } - END { if (!inserted) exit 1 } - ' "$file" > "$patched_file" - - cp "$patched_file" "$file" - rm -f "$patched_file" +# AeroCore Return to Gaming Mode shortcut migration +# Replace the legacy privileged systemd launcher left by older Bazzite images. +if [[ -f "$HOME/Desktop/Return.desktop" ]]; then + sed -i 's|^Exec=systemctl start return-to-gamemode\.service$|Exec=/usr/bin/return-to-gamemode|' "$HOME/Desktop/Return.desktop" +fi +EOF } # Keep AeroCore's public image-name, while restoring the Deck capability checks |
