From 1fb77f9a7084ed36207a958495a0b463a5661d91 Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 20 Jun 2006 23:11:36 +0000 Subject: 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 --- mk/tools/msgfmt.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 = "^$" -- cgit v1.2.3