From d7231ebbd841aeafa2250895d7bc779e86d3f466 Mon Sep 17 00:00:00 2001 From: Rick Peters Date: Thu, 24 Sep 2026 10:04:29 +0200 Subject: [PATCH] chore: Move the bundle tool to .github/tools/bundle.sh Update its repo-root path and all references (workflow, README, AGENTS.md). --- {tools => .github/tools}/bundle.sh | 6 +++--- .github/workflows/bundle.yml | 4 ++-- AGENTS.md | 2 +- CHANGELOG.md | 1 + README.md | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) rename {tools => .github/tools}/bundle.sh (91%) diff --git a/tools/bundle.sh b/.github/tools/bundle.sh similarity index 91% rename from tools/bundle.sh rename to .github/tools/bundle.sh index fa213be..54ffb77 100755 --- a/tools/bundle.sh +++ b/.github/tools/bundle.sh @@ -1,13 +1,13 @@ #!/bin/bash # Build a single-file version of the wizard for `curl | bash` use: -# tools/bundle.sh [output] (default: dist/setup-gamescope-boot.sh) +# .github/tools/bundle.sh [output] (default: dist/setup-gamescope-boot.sh) # # Inlines lib/*.sh in the order setup-gamescope-boot.sh sources them and # wraps the entry point's body in main(), so bash has read the whole file # before anything runs. That lets the bundle reattach stdin to the terminal # when it was piped in by curl, so the interactive menu still works. set -euo pipefail -cd "$(dirname "$0")/.." +cd "$(dirname "$0")/../.." out="${1:-dist/setup-gamescope-boot.sh}" entry=setup-gamescope-boot.sh @@ -22,7 +22,7 @@ version="v$(grep -oP '^VERSION=\K.*' "$entry"), $(git describe --always --dirty { # Header comment and `set` line of the entry point, up to the source loop. sed -n '1,/^SCRIPT_DIR=/p' "$entry" | sed '$d' - echo "# Single-file build ($version), generated by tools/bundle.sh - edit the" + echo "# Single-file build ($version), generated by .github/tools/bundle.sh - edit the" echo "# sources in the repository instead: https://github.com/theupriser/cachyos-gamescope-boot" echo for lib in $libs; do diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 283bf0f..90b3c03 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -1,4 +1,4 @@ -# Builds the single-file wizard (tools/bundle.sh) and publishes it as the +# Builds the single-file wizard (.github/tools/bundle.sh) and publishes it as the # asset of the rolling "latest" release, for: # curl -fsSL https://github.com/theupriser/cachyos-gamescope-boot/releases/download/latest/setup-gamescope-boot.sh | bash # Pull requests only build and check it. @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 # for the version in the bundle's header - name: Build - run: tools/bundle.sh dist/setup-gamescope-boot.sh + run: .github/tools/bundle.sh dist/setup-gamescope-boot.sh - name: Check run: | diff --git a/AGENTS.md b/AGENTS.md index fa60881..3c16209 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine `krevert `. Never call `kwriteconfig6` directly for settings a component owns. System files are backed up with `backup_file` and restored on disable. -- **Single-file build.** `tools/bundle.sh` inlines `lib/*.sh` in the order of +- **Single-file build.** `.github/tools/bundle.sh` inlines `lib/*.sh` in the order of the entry point's `for lib in ...; do` source loop and wraps everything after that loop in `main()`. Keep that loop on one line, keep all logic in functions, and don't rely on `SCRIPT_DIR` for anything but sourcing. diff --git a/CHANGELOG.md b/CHANGELOG.md index cc2f76d..db9960e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ Machine LED driver works on every installed kernel and survives kernel updates. version's section of `CHANGELOG.md`. - Fix a shellcheck warning in the bundle (a variable name shared with `lib/state.sh`), which would have failed the CI check. +- **chore: Move the bundle tool to .github/tools/bundle.sh** ## 0.6.2 - 2026-09-23 diff --git a/README.md b/README.md index cb93445..b8e3f8c 100644 --- a/README.md +++ b/README.md @@ -329,11 +329,11 @@ gamescope-session, ...) stay installed. | `lib/steamos-extras.sh` | SteamOS desktop extras from Valve's package (Add to Steam, Nested Desktop, icon, keyboard rule, KWallet) | | `lib/single-user.sh` | Single user mode: no lock screen, user switching or log out | | `lib/steam-machine.sh` | Steam Machine support: LED driver, LED access, steamos-manager | -| `tools/bundle.sh` | Builds the single-file version (`dist/setup-gamescope-boot.sh`) | +| `.github/tools/bundle.sh` | Builds the single-file version (`dist/setup-gamescope-boot.sh`) | | `.github/workflows/bundle.yml` | Builds and checks it on every push; publishes it on `main` | The single-file version is generated: on every push to `main`, GitHub -Actions runs `tools/bundle.sh`, checks the result with `bash -n` and +Actions runs `.github/tools/bundle.sh`, checks the result with `bash -n` and shellcheck, and uploads it to the rolling `latest` release. It inlines `lib/*.sh` and wraps the entry point in `main()`, so bash has read the whole file before anything runs; when stdin is a pipe (`curl | bash`) it reattaches