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() {
|
2024-11-09 00:49:08 +00:00
|
|
|
${JQ} -nr -L "$(realpath .)" -L "$(realpath ./lib)" -L "$(realpath ./dropins)/${JQ_FLAVOR}" \
|
2024-11-07 21:45:22 +00:00
|
|
|
--slurpfile exportFile "${EXPORT_FILE:-export.json}" \
|
|
|
|
'include "main"; main' \
|
|
|
|
--args -- "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
run "$@"
|
2024-11-07 08:58:38 +00:00
|
|
|
|