summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-20 23:11:36 +0000
committerjlam <jlam@pkgsrc.org>2006-06-20 23:11:36 +0000
commit1fb77f9a7084ed36207a958495a0b463a5661d91 (patch)
tree7a7f9a8479a2e49a41c2b11da008cc2642e42561 /mk
parentaef71c6763583bd111e3a6e9b36c0e7dc66b6955 (diff)
downloadpkgsrc-1fb77f9a7084ed36207a958495a0b463a5661d91.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')
-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 = "^$"