summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/blacklist.sh2
-rw-r--r--src/lib/conf.sh.in9
-rwxr-xr-xsrc/lib/librelib2
-rwxr-xr-xsrc/lib/librexgettext2
-rw-r--r--src/lib/messages.sh2
5 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/blacklist.sh b/src/lib/blacklist.sh
index 15366b8..9597bbc 100644
--- a/src/lib/blacklist.sh
+++ b/src/lib/blacklist.sh
@@ -42,7 +42,7 @@ blacklist-cat() {
# Usage: blacklist-update
# Updates (or creates) the cached copy of the blacklist.
blacklist-update() (
- . libremessages
+ . "$(librelib messages)"
load_files libretools || return 1
check_vars libretools BLACKLIST || return 1
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 8394801..0b2275a 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -133,7 +133,7 @@ load_files() {
# Check whether the variables listed are properly set.
# If not, it prints a message saying to set them in the configuration file(s)
# for $slug.
-check_vars() (
+check_vars() {
local slug=$1; shift
local ret=0
@@ -141,12 +141,11 @@ check_vars() (
local VAR
for VAR in "$@"; do
if [[ -z ${!VAR:-} ]]; then
- type print &>/dev/null || . libremessages
if [[ $(list_files $slug|wc -l) -gt 1 ]]; then
- _l print "Configure '%s' in one of:" "$VAR"
+ libremessages _l print "Configure '%s' in one of:" "$VAR"
list_files $slug | sed 's/./ -> &/'
else
- _l print "Configure '%s' in '%s'" "$VAR" "$(list_files $slug)"
+ libremessages _l print "Configure '%s' in '%s'" "$VAR" "$(list_files "$slug")"
fi
ret=1
fi
@@ -155,7 +154,7 @@ check_vars() (
if [[ $ret != 0 ]]; then
return 1
fi
-)
+}
# Usage: get_var <slug> <var_name> <default_value>
# Does not work with arrays
diff --git a/src/lib/librelib b/src/lib/librelib
index e9d184e..fc03e32 100755
--- a/src/lib/librelib
+++ b/src/lib/librelib
@@ -47,7 +47,7 @@ prose() {
cmd=${0##*/}
usage() {
- . libremessages
+ . libremessages # Don't change this to use librelib
print 'Usage: . $(%s LIBRARY)' "$cmd"
print 'Usage: %s -h' "$cmd"
print "Finds a Bash library file"
diff --git a/src/lib/librexgettext b/src/lib/librexgettext
index db575d6..a4f2eb9 100755
--- a/src/lib/librexgettext
+++ b/src/lib/librexgettext
@@ -42,7 +42,7 @@ errusage() {
}
usage() {
- . libremessages
+ . "$(librelib messages)"
print 'Usage: %s [OPTIONS] FILES...' "${0##*/}"
print 'Generates .pot files for programs using libremessages'
echo
diff --git a/src/lib/messages.sh b/src/lib/messages.sh
index 0125003..e85590f 100644
--- a/src/lib/messages.sh
+++ b/src/lib/messages.sh
@@ -33,7 +33,7 @@
# Inherit most functions from devtools #
################################################################################
-. "$(librelib common.sh)"
+. "$(librelib common)"
################################################################################
# Own functions #