mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 07:24:31 +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>
29 lines
657 B
Bash
Executable File
29 lines
657 B
Bash
Executable File
#!/bin/sh
|
|
#shellcheck disable=SC2004
|
|
|
|
set -eu
|
|
|
|
: > "$SHELLSPEC_PROFILER_LOG"
|
|
|
|
index=0 counter=0
|
|
|
|
: > "$SHELLSPEC_PROFILER_SIGNAL"
|
|
|
|
while [ -e "$SHELLSPEC_PROFILER_SIGNAL" ]; do
|
|
if [ -s "$SHELLSPEC_PROFILER_SIGNAL" ]; then
|
|
eval "counter${index}=$counter index=$(($index + 1))"
|
|
: > "$SHELLSPEC_PROFILER_SIGNAL"
|
|
fi
|
|
counter=$(($counter + 1))
|
|
done
|
|
|
|
i=0 start='' end=''
|
|
while [ "$i" -lt "$index" ]; do
|
|
eval "start=\$counter${i} end=\${counter$(($i + 1)):-}"
|
|
[ "$end" ] || break
|
|
echo "$(($end - $start))" >> "$SHELLSPEC_PROFILER_LOG"
|
|
i=$(($i + 2))
|
|
done
|
|
echo "$counter" > "$SHELLSPEC_PROFILER_LOG.total"
|
|
: > "$SHELLSPEC_TMPBASE/profiler.done"
|