prole/tests/shellspec/.vendor/shellspec-0.28.1/libexec/shellspec-gen-bin.sh
chrisfu 909e92109e Refactor shell layout; add shellspec + authority
- Introduce lib/shell helpers and keep etc/* scripts thin via compatibility shims

- Move Kerberos validation to scripts/validation/check_kerberos.sh and update callers

- Add deterministic shellspec unit tests under tests/shellspec/ and wire Maven to run them

- Add minimal Spring Boot authority module with startup + /health endpoint and Maven wiring

- Document the new layout in docs/layout.md

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-13 09:19:56 -07:00

35 lines
679 B
Bash
Executable File

#!/bin/sh
set -eu
# shellcheck source=lib/libexec.sh
. "${SHELLSPEC_LIB:-./lib}/libexec.sh"
test || __() { :; }
# shellcheck disable=SC2016
generate() {
echo "#!/bin/sh -e"
echo ". \"\$SHELLSPEC_SUPPORT_BIN\""
echo "invoke $1 \"\$@\""
}
__ main __
if [ ! -e "$SHELLSPEC_HELPERDIR" ]; then
abort "shellspec helper directory not found: $SHELLSPEC_HELPERDIR"
fi
mkdir -p "$SHELLSPEC_SUPPORT_BINDIR"
for cmd; do
bin="$SHELLSPEC_SUPPORT_BINDIR/$cmd"
if [ -e "$bin" ]; then
warn "Skip, $cmd already exist (${SHELLSPEC_SUPPORT_BINDIR#"$PWD/"}/$cmd)"
else
generate "${cmd#@}" > "$bin"
chmod +x "$bin"
echo "Generate $cmd (${bin#"$PWD/"})"
fi
done