pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools Do a bit more error-checking -- if no input f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0f496bbac336
branches:  trunk
changeset: 511383:0f496bbac336
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Apr 13 19:41:22 2006 +0000

description:
Do a bit more error-checking -- if no input file is specified, just run
the msgfmt command to get the right error message and return code.

diffstat:

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

diffs (27 lines):

diff -r 7cf612c5da97 -r 0f496bbac336 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh        Thu Apr 13 19:27:54 2006 +0000
+++ b/mk/tools/msgfmt.sh        Thu Apr 13 19:41:22 2006 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: msgfmt.sh,v 1.1 2006/04/13 16:35:58 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.2 2006/04/13 19:41:22 jlam Exp $
 #
 # Copyright (c) 2004, 2005, 2006 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
 #
@@ -45,6 +45,7 @@
 
 # Parse the command line options.
 version=
+pofile=
 cmd="${MSGFMT}"
 while test $# -gt 0; do
        case "$1" in
@@ -67,6 +68,7 @@
 
 # If we are asked for just the version, then avoid spawning awk.
 test -z "$version" || exec $cmd
+test -n "$pofile" || exec $cmd
 
 cat $pofile | ${AWK} '
 {



Home | Main Index | Thread Index | Old Index