mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-22 23:22:18 +01:00
Install the pinned proton-cachyos-native build (signature and sha256 checked, .INSTALL never run), decide per game whether it is safe, write the CompatToolMapping as text, add --map-installed and --valve-proton, and drop steamcmd from install.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.5 KiB
Bash
Executable File
39 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# ============================================================================
|
|
# Deploy origin/main to where this tool runs: kuhy's checkout
|
|
# (~/src/steam-game-installer, used through ./run.sh). Refuses a dirty tree,
|
|
# fast-forwards it, reruns ./run.sh --deps-only (libibus, depotdownloader, the native Proton,
|
|
# editable .venv), then starts the CLI as the health check. Nothing is
|
|
# published elsewhere: no package, no service, no release.
|
|
# Idempotent; non-zero unless the checkout is at origin/main and the CLI starts.
|
|
# scripts/deploy.sh
|
|
# SGI_DEPLOY_DIR=/path another checkout (the test uses a fixture)
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
readonly DIR="${SGI_DEPLOY_DIR:-$HOME/src/steam-game-installer}"
|
|
|
|
die() {
|
|
echo "deploy: FAILED ($1)" >&2
|
|
exit 1
|
|
}
|
|
|
|
main() {
|
|
[[ -d "$DIR/.git" ]] || die "no checkout at $DIR"
|
|
[[ -z "$(git -C "$DIR" status --porcelain)" ]] || die "$DIR has local changes"
|
|
git -C "$DIR" checkout -q main || die "cannot switch $DIR to main"
|
|
git -C "$DIR" pull -q --ff-only origin main || die "cannot fast-forward $DIR"
|
|
local head want
|
|
head="$(git -C "$DIR" rev-parse HEAD)"
|
|
want="$(git -C "$DIR" rev-parse origin/main)"
|
|
[[ "$head" == "$want" ]] || die "$DIR is at ${head:0:7}, origin/main is ${want:0:7}"
|
|
(cd "$DIR" && ./run.sh --deps-only) || die "dependency install failed"
|
|
"$DIR/.venv/bin/python" -m steam_installer.cli --help >/dev/null ||
|
|
die "health check: the CLI does not start"
|
|
echo "deploy: $DIR at ${head:0:7}, deps ok, CLI starts"
|
|
}
|
|
|
|
main "$@"
|