summaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-14 17:44:22 +0200
committerDanilo M. <danix@danix.xyz>2026-07-14 17:44:22 +0200
commitfdc21a1efbe60eab048c4ba36ea9bc45889fec06 (patch)
treefb3f96ebb573193b290a2084feb8505d244b3c1b /install.sh
parent15ec43e46c94adac00a92099f324f74e16ae36b4 (diff)
downloadsbo-dockerbuild-fdc21a1efbe60eab048c4ba36ea9bc45889fec06.tar.gz
sbo-dockerbuild-fdc21a1efbe60eab048c4ba36ea9bc45889fec06.zip
Add SemVer versioning (1.0.0)v1.0.0
Bake a PROJECT_VERSION="1.0.0" const into every script (test-build, install.sh, and the three image-builder/*.sh). test-build and install.sh expose -V/--version; the image-builder scripts already use --version for the Slackware target, so their project-version flag is -V only. bootstrap.sh handles -V before its root check so it is queryable as any user. No VERSION file: a release bump is one sed over the consts, anchored on ^PROJECT_VERSION= so it never hits the SBo package VERSION/OPT_VERSION vars. Release procedure documented in CLAUDE.md; user-facing note in README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/install.sh b/install.sh
index 5b79cc3..6c7d96e 100755
--- a/install.sh
+++ b/install.sh
@@ -22,6 +22,7 @@
# ./install.sh --uninstall remove it
set -euo pipefail
+PROJECT_VERSION="1.0.0" # bump via sed across all scripts; see CLAUDE.md Releases
HERE="$(cd "$(dirname "$0")" && pwd)"
BINDIR="${BINDIR:-$HOME/bin}"
PROG=test-build
@@ -29,10 +30,12 @@ CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}/sbo-testbuild"
CONF="$CONFDIR/config"
OVERRIDES="$CONFDIR/overrides"
-if [[ "${1:-}" == "--uninstall" ]]; then
- rm -f "$BINDIR/$PROG" && echo "removed $BINDIR/$PROG"
- exit 0
-fi
+case "${1:-}" in
+ -V|--version) echo "install.sh $PROJECT_VERSION"; exit 0 ;;
+ --uninstall)
+ rm -f "$BINDIR/$PROG" && echo "removed $BINDIR/$PROG"
+ exit 0 ;;
+esac
[[ -f "$HERE/$PROG" ]] || { echo "$PROG not found in $HERE" >&2; exit 1; }
mkdir -p "$BINDIR"