summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/share
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-07-05 19:57:40 +0000
committerdteske <dteske@FreeBSD.org>2013-07-05 19:57:40 +0000
commitdae6ea95bebbdb46d17ef97e559cf84dcf37235d (patch)
tree201072af02fb15fc6d8a3a641724f44a0acf9147 /usr.sbin/bsdconfig/share
parentf00a060f04f6e177a5ee03ef9d1b1951505096cf (diff)
downloadFreeBSD-src-dae6ea95bebbdb46d17ef97e559cf84dcf37235d.zip
FreeBSD-src-dae6ea95bebbdb46d17ef97e559cf84dcf37235d.tar.gz
Don't calculate the tag until we know that we're going to make a new menu
item entry. Also join simple NULL assignments into a single line.
Diffstat (limited to 'usr.sbin/bsdconfig/share')
-rw-r--r--usr.sbin/bsdconfig/share/common.subr16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr
index 32d6aba..6c0400a 100644
--- a/usr.sbin/bsdconfig/share/common.subr
+++ b/usr.sbin/bsdconfig/share/common.subr
@@ -531,12 +531,22 @@ f_index_file()
if [ "$lang" ]; then
awk -v keyword="$keyword" "$f_index_file_awk" \
- $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX.$lang &&
- return
+ $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX.$lang && return
# No match, fall-thru to non-i18n sources
fi
awk -v keyword="$keyword" "$f_index_file_awk" \
- $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX
+ $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX && return
+
+ # No match? Fall-thru to `local' libexec sources (add-on modules)
+
+ [ "$BSDCFG_LOCAL_LIBE" ] || return $FAILURE
+ if [ "$lang" ]; then
+ awk -v keyword="$keyword" "$f_index_file_awk" \
+ $BSDCFG_LOCAL_LIBE/*/INDEX.$lang && return
+ # No match, fall-thru to non-i18n sources
+ fi
+ awk -v keyword="$keyword" "$f_index_file_awk" \
+ $BSDCFG_LOCAL_LIBE/*/INDEX
}
# f_index_menusel_keyword $indexfile $pgm
OpenPOWER on IntegriCloud