diff options
author | dteske <dteske@FreeBSD.org> | 2013-07-05 19:57:40 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-07-05 19:57:40 +0000 |
commit | dae6ea95bebbdb46d17ef97e559cf84dcf37235d (patch) | |
tree | 201072af02fb15fc6d8a3a641724f44a0acf9147 /usr.sbin/bsdconfig/share | |
parent | f00a060f04f6e177a5ee03ef9d1b1951505096cf (diff) | |
download | FreeBSD-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.subr | 16 |
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 |