From 0dc5ffd01cfd621b4cb6830d5ab77a9031c802b0 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 5 Jun 2024 22:29:02 +0200 Subject: asdf experiment --- bin/asdf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 bin/asdf (limited to 'bin/asdf') 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" "${@}" -- cgit v1.2.3