diff options
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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" |
