diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/asdf | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/asdf b/bin/asdf new file mode 100755 index 0000000..aa36c16 --- /dev/null +++ b/bin/asdf @@ -0,0 +1,23 @@ +#!/bin/bash + +set -euo pipefail + +v="0.14.0" + +basedir="${0%/*}" +self="${0##*/}" + +url="https://github.com/asdf-vm/asdf/archive/refs/tags/v$v.tar.gz" +dir="$basedir/.tmp" +bin="$dir/$self-$v/bin/$self" + +if [ ! -x "$bin" ] +then + rm -rf "$dir" + mkdir -p "${dir}" + curl -L "$url" | tar xfz - -C $dir +fi + +export ASDF_DATA_DIR="$dir/asdf-data" + +exec "$bin" "${@}" |