summaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
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"