summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorjlam <jlam>2006-04-15 04:41:08 +0000
committerjlam <jlam>2006-04-15 04:41:08 +0000
commit402aeab539701960e185a3c05c975df4b093147e (patch)
tree7905ac9cbddfbbe4ba2a93bcd720f242e5ec8e62 /mk/tools
parent19f594c3fd57553cb9c07c3ed8581bd9590e9997 (diff)
downloadpkgsrc-402aeab539701960e185a3c05c975df4b093147e.tar.gz
Reorder the loop so that we can never get into an infinite loop. We
now pass every line we don't need to process directly through to msgfmt. This fixes building pt_BR.po in libgnomedb where all of the lines end with "^M" and this script wasn't properly detecting a blank line as a result.
Diffstat (limited to 'mk/tools')
-rwxr-xr-xmk/tools/msgfmt.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/mk/tools/msgfmt.sh b/mk/tools/msgfmt.sh
index 786333f15f6..edc61b7c415 100755
--- a/mk/tools/msgfmt.sh
+++ b/mk/tools/msgfmt.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.13 2006/04/15 04:32:02 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.14 2006/04/15 04:41:08 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -135,15 +135,6 @@ BEGIN {
obsolete = ""
while (result == 1) {
- # Pass blank lines or comments verbatim.
- COMMENT_BLANK_RE = "^(#|[ ]*$)"
- if ($0 ~ COMMENT_BLANK_RE) {
- print $0
- result = getline
- if (result < 0) break
- continue
- }
-
# Buffer any "msgid" statements into the singular array.
MSGID_RE = ORE "msgid[ ]+"
if ($0 ~ MSGID_RE) {
@@ -283,6 +274,11 @@ BEGIN {
if (result < 0) break
continue
}
+
+ # Pass everything else verbatim.
+ print $0
+ result = getline
+ if (result < 0) break
}
}
' | $debug | $cmd