summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-04-15 04:41:08 +0000
committerjlam <jlam@pkgsrc.org>2006-04-15 04:41:08 +0000
commit4d600649329d6bdec8e6ef960d0666f374b1a3b4 (patch)
tree7905ac9cbddfbbe4ba2a93bcd720f242e5ec8e62 /mk
parentc5dba803cba425b422419c211da5ecd24ef67b2b (diff)
downloadpkgsrc-4d600649329d6bdec8e6ef960d0666f374b1a3b4.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')
-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