summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-20 23:11:36 +0000
committerjlam <jlam>2006-06-20 23:11:36 +0000
commit7e10741f1569c6347f635e2d62a7bf1e418f9b99 (patch)
tree7a7f9a8479a2e49a41c2b11da008cc2642e42561 /mk/tools
parentff549a83d0e3cd93e3973023141ad31c2392fc07 (diff)
downloadpkgsrc-7e10741f1569c6347f635e2d62a7bf1e418f9b99.tar.gz
Executiing "msgfmt ru" should look for "ru" and then "ru.po" for
processing. Allow for this possiblity by falling through both names when given input files. This fixes the builds of sysutils/dfuibe_installer and sysutils/dfuife_curses noted in the bulk build results: http://mail-index.netbsd.org/pkgsrc-bulk/2006/06/20/0000.html
Diffstat (limited to 'mk/tools')
-rwxr-xr-xmk/tools/msgfmt.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/tools/msgfmt.sh b/mk/tools/msgfmt.sh
index 9b971a574d0..95a8cb6d9ec 100755
--- a/mk/tools/msgfmt.sh
+++ b/mk/tools/msgfmt.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.23 2006/06/20 22:35:25 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.24 2006/06/20 23:11:36 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -124,6 +124,21 @@ else
debug="${TEE} $pofile.debug"
fi
+# If the input file cannot be found as named, then also search for a file
+# with the same name that ends in ".po".
+#
+if test ! -f "$pofile"; then
+ case "$pofile" in
+ *.po) popofile=$pofile ;;
+ *) popofile=${pofile}.po ;;
+ esac
+ if test ! -f "$popofile"; then
+ echo 1>&2 "$0: error while opening \"$pofile\" for reading: No such file or directory"
+ exit 1
+ fi
+ pofile="$popofile"
+fi
+
${CAT} $pofile | ${AWK} '
BEGIN {
EMPTY = "^$"