prole/tests/shellspec/.vendor/shellspec-0.28.1/lib/support-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

36 lines
828 B
Bash

#!/bin/sh
# NOTE: This file must be compatible with the Bourne shell,
# because /bin/sh can be the Bourne shell.
# Workaround for ksh. Remove readonly flag inherited to child process
if [ "${SHELLSPEC_PATH_IS_READONLY:-}" ]; then
if [ ! "$SHELLSPEC_PATH_IS_READONLY" = "-" ]; then
SHELLSPEC_PATH_IS_READONLY="-"
# shellcheck disable=SC2086
exec $SHELLSPEC_SHELL "$0" "$@"
fi
# shellcheck disable=SC2039
typeset +x PATH
exec "$SHELLSPEC_ENV" PATH="$PATH" SHELLSPEC_PATH_IS_READONLY="" "$0" "$@"
fi
PATH="${SHELLSPEC_PATH:?}"
export PATH
invoke() {
cmd=$1
shift
if [ ! "$SHELLSPEC_BUSYBOX_W32" ]; then
[ "${ZSH_VERSION:-}" ] && setopt shwordsplit
OLDIFS=$IFS && IFS=":"
for p in $PATH; do
[ -x "$p/$cmd" ] && cmd="$p/$cmd" && break
done
IFS=$OLDIFS
fi
"$cmd" "$@"
}