diff options
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..ca562df --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +if [ -z tools ]; then + echo "Error: tools directory not found. Run this script from the root directory." + exit 1 +fi + +cd tools + +# read TARGET without newline after prompt +read -p "Install to? [default:/usr/local/bin] " TARGET + +if [ -z "$TARGET" ]; then + TARGET="/usr/local/bin" +fi +TARGET="$(eval echo "$TARGET")" + +(set -x; mkdir -p "$TARGET") + +for file in *; do + (set -x; ln -s "$(realpath "$file")" "$TARGET/$file") || true +done |
