chore: Move the bundle tool to .github/tools/bundle.sh

Update its repo-root path and all references (workflow, README, AGENTS.md).
This commit is contained in:
theupriser committed 2026-09-24 10:04:29 +02:00
1 parent 9d27239d00
commit 2d80e16e6f
5 files changed
+9 -8

No files matched your search

+3 -3
View File
@@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
# Build a single-file version of the wizard for `curl | bash` use: # 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 # 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 # 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 # 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. # when it was piped in by curl, so the interactive menu still works.
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/../.."
out="${1:-dist/setup-gamescope-boot.sh}" out="${1:-dist/setup-gamescope-boot.sh}"
entry=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. # Header comment and `set` line of the entry point, up to the source loop.
sed -n '1,/^SCRIPT_DIR=/p' "$entry" | sed '$d' 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 "# sources in the repository instead: https://github.com/theupriser/cachyos-gamescope-boot"
echo echo
for lib in $libs; do for lib in $libs; do
+2 -2
View File
@@ -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: # asset of the rolling "latest" release, for:
# curl -fsSL https://github.com/theupriser/cachyos-gamescope-boot/releases/download/latest/setup-gamescope-boot.sh | bash # curl -fsSL https://github.com/theupriser/cachyos-gamescope-boot/releases/download/latest/setup-gamescope-boot.sh | bash
# Pull requests only build and check it. # Pull requests only build and check it.
@@ -22,7 +22,7 @@ jobs:
fetch-depth: 0 # for the version in the bundle's header fetch-depth: 0 # for the version in the bundle's header
- name: Build - name: Build
run: tools/bundle.sh dist/setup-gamescope-boot.sh run: .github/tools/bundle.sh dist/setup-gamescope-boot.sh
- name: Check - name: Check
run: | run: |
+1 -1
View File
@@ -31,7 +31,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine
`krevert <component>`. Never call `kwriteconfig6` directly for settings a `krevert <component>`. Never call `kwriteconfig6` directly for settings a
component owns. System files are backed up with `backup_file` and restored component owns. System files are backed up with `backup_file` and restored
on disable. 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 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 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. functions, and don't rely on `SCRIPT_DIR` for anything but sourcing.
+1
View File
@@ -43,6 +43,7 @@ Machine LED driver works on every installed kernel and survives kernel updates.
version's section of `CHANGELOG.md`. version's section of `CHANGELOG.md`.
- Fix a shellcheck warning in the bundle (a variable name shared with - Fix a shellcheck warning in the bundle (a variable name shared with
`lib/state.sh`), which would have failed the CI check. `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 ## 0.6.2 - 2026-09-23
+2 -2
View File
@@ -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/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/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 | | `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` | | `.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 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 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 `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 file before anything runs; when stdin is a pipe (`curl | bash`) it reattaches