hotdog/run

16 lines
275 B
Bash
Executable file

#!/bin/sh -e
export RUN_BIN="$0"
export RUN_DIR=$(dirname "$(realpath "$0")")
task=
if [ -e "$RUN_DIR/scripts/$1" ]; then
task="$1"
elif [ -e "$RUN_DIR/scripts/local/$1" ]; then
task="local/$1"
fi
[ -z "$task" ] && exit 1
shift
exec "$RUN_DIR/scripts/$task" "$@"