mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
check_kerberos.sh (already updated) sourced knoe_env.sh, knoe_secrets.sh, knoe_string.sh, and knoe_yaml.sh but the files were still named prole_*.sh. No other script referenced the old names, so this is a pure rename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
397 B
Bash
20 lines
397 B
Bash
#!/usr/bin/env bash
|
|
|
|
knoe_trim() {
|
|
local s="${1:-}"
|
|
# Trim leading/trailing whitespace without invoking external tools.
|
|
s="${s#${s%%[![:space:]]*}}"
|
|
s="${s%${s##*[![:space:]]}}"
|
|
printf '%s' "$s"
|
|
}
|
|
|
|
knoe_normalize_realm() {
|
|
local realm
|
|
realm=$(knoe_trim "${1:-}")
|
|
if [[ -z "$realm" ]]; then
|
|
printf '%s' ""
|
|
return 0
|
|
fi
|
|
printf '%s' "$realm" | tr '[:lower:]' '[:upper:]'
|
|
}
|