summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2006-04-15 04:41:08 +0000
committerjlam <jlam>2006-04-15 04:41:08 +0000
commit910c26713cbebc55fb2d612ab8e4088d083f5401 (patch)
tree7905ac9cbddfbbe4ba2a93bcd720f242e5ec8e62
parentcb4fdec4cc0b14d56d114ecf0dd8548107bb3e9b (diff)
downloadpkgsrc-910c26713cbebc55fb2d612ab8e4088d083f5401.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.
-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