diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-06-05 22:29:02 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-06-05 22:29:02 +0200 |
commit | 0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0 (patch) | |
tree | 8334157c50e23ca4355a3c344e4c97efb2a500e5 /bin/asdf | |
parent | 0beb51381519c62e1882acdc37ed3c2b2873b020 (diff) | |
download | infra-0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0.tar.gz infra-0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0.tar.bz2 infra-0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0.tar.xz infra-0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0.zip |
asdf experiment
Diffstat (limited to 'bin/asdf')
-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" "${@}" |