mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 15:34:30 +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>
23 lines
434 B
Bash
Executable File
23 lines
434 B
Bash
Executable File
#!/bin/sh
|
|
#shellcheck disable=SC2004
|
|
|
|
# Part of 22.sourced_script_spec.sh
|
|
|
|
count_lines() {
|
|
i=0
|
|
while read -r line || [ "$line" ]; do
|
|
i=$(($i + 1))
|
|
done
|
|
echo "$i"
|
|
}
|
|
|
|
# When included from shellspec, __SOURCED__ variable defined and script
|
|
# end here. The script path is assigned to the __SOURCED__ variable.
|
|
${__SOURCED__:+return}
|
|
|
|
if [ "${1:-}" ]; then
|
|
count_lines < "$1"
|
|
else
|
|
echo "Usage: count_lines FILENAME" >&2
|
|
fi
|