pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools Executiing "msgfmt ru" should look for "ru" a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9fdbcce2d350
branches:  trunk
changeset: 514943:9fdbcce2d350
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Jun 20 23:11:36 2006 +0000

description:
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:

 mk/tools/msgfmt.sh |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r ca62949d4535 -r 9fdbcce2d350 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh        Tue Jun 20 22:57:12 2006 +0000
+++ b/mk/tools/msgfmt.sh        Tue Jun 20 23:11:36 2006 +0000
@@ -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 @@
        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 = "^$"



Home | Main Index | Thread Index | Old Index