journal/run.sh

20 lines
375 B
Bash
Raw Normal View History

2024-11-07 08:58:38 +00:00
#!/usr/bin/env bash
set -eu
SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)"
2024-11-07 21:45:22 +00:00
cd "$SCRIPT_DIR/tool"
JQ=${JQ:-jq}
export JQ_FLAVOR=${JQ_FLAVOR:-${JQ}}
run() {
${JQ} -rn -L "$(realpath .)" -L "$(realpath lib)" -L "$(realpath dropins)/${JQ_FLAVOR}" \
--slurpfile exportFile "${EXPORT_FILE:-export.json}" \
'include "main"; main' \
--args -- "$@"
}
run "$@"
2024-11-07 08:58:38 +00:00