mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 19:14:33 +00:00
- 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>
35 lines
679 B
Bash
Executable File
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
|