diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-11 10:19:02 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-11 15:43:36 -0400 |
commit | 8443cad920a59918069dbee3891b4b9595c528a3 (patch) | |
tree | 944abe452a5db85b045d422a39088bca7094a5cb /src/lib/conf.sh | |
parent | 4b9f4323abfaa0f4030cc29aed97e0716f9c5852 (diff) |
librelib: Internationalize (actually use the internationalization stuff)
Diffstat (limited to 'src/lib/conf.sh')
-rw-r--r-- | src/lib/conf.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/conf.sh b/src/lib/conf.sh index 8b855fe..ea4f15e 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -106,21 +106,24 @@ load_files() { # If not, it prints a message saying to set them in the configuration file(s) # for $slug. check_vars() { - local slug=$1 - shift + local slug=$1; shift + local ret=0 + local VAR for VAR in "$@"; do if [[ -z ${!VAR:-} ]]; then + type print &>/dev/null || . libremessages if [[ $(list_files $slug|wc -l) -gt 1 ]]; then - echo "Configure '$VAR' in one of:" + print "Configure '%s' in one of:" "$VAR" list_files $slug | sed 's/./ -> &/' else - echo "Configure '$VAR' in $(list_files $slug)" + print "Configure '%s' in '%s'" "$VAR" "$(list_files $slug)" fi ret=1 fi done >&2 + if [[ $ret != 0 ]]; then return 1 fi |