unwind/run

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
331 B
Text
Raw Normal View History

#!/bin/sh -eu
RUN_BIN=$(realpath "$0")
RUN_DIR=$(dirname "$RUN_BIN")
task="$1"
shift
: "${RUN_TASK:=$task}"
export RUN_BIN
export RUN_DIR
export RUN_TASK
script="$RUN_DIR"/scripts.local/"$task"
[ -f "$script" ] || script="$RUN_DIR"/scripts/"$task"
[ -f "$RUN_DIR"/.env.local ] && . "$RUN_DIR"/.env.local
exec "$script" "$@"