From 35c719b4c3f468be361433ed6c25c52cf7e4f15d Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 13 Apr 2006 19:41:22 +0000 Subject: 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. --- mk/tools/msgfmt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mk') diff --git a/mk/tools/msgfmt.sh b/mk/tools/msgfmt.sh index cb09303168c..80d409c2c52 100755 --- a/mk/tools/msgfmt.sh +++ b/mk/tools/msgfmt.sh @@ -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 # @@ -45,6 +45,7 @@ fi # Parse the command line options. version= +pofile= cmd="${MSGFMT}" while test $# -gt 0; do case "$1" in @@ -67,6 +68,7 @@ done # 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} ' { -- cgit v1.2.3