summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-04-13 19:41:22 +0000
committerjlam <jlam@pkgsrc.org>2006-04-13 19:41:22 +0000
commit35c719b4c3f468be361433ed6c25c52cf7e4f15d (patch)
tree8a0477dffd2eefe04dd624802b7a2a3ccda69247 /mk
parenta3e11a9221338c8397b148133f8fb2956c36a05c (diff)
downloadpkgsrc-35c719b4c3f468be361433ed6c25c52cf7e4f15d.tar.gz
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 (limited to 'mk')
-rwxr-xr-xmk/tools/msgfmt.sh4
1 files changed, 3 insertions, 1 deletions
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 <jmmv@NetBSD.org>
#
@@ -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} '
{