#!/bin/sh # Install wdsexport as a single executable file (no dependencies beyond python3). # Usage: ./install.sh [PREFIX] default PREFIX: ~/.local (installs to PREFIX/bin/wdsexport) set -eu prefix="${1:-$HOME/.local}" src="$(cd "$(dirname "$0")" && pwd)/wdsexport.py" command -v python3 >/dev/null || { echo "python3 not found" >&2; exit 1; } mkdir -p "$prefix/bin" install -m 755 "$src" "$prefix/bin/wdsexport" echo "installed $prefix/bin/wdsexport" case ":$PATH:" in *":$prefix/bin:"*) ;; *) echo "note: $prefix/bin is not on your PATH" >&2 ;; esac