summaryrefslogtreecommitdiff
path: root/mk/tools
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
commit0a8a7fd62a3a335cd8810d08aecf70b776b77cbe (patch)
tree7905ac9cbddfbbe4ba2a93bcd720f242e5ec8e62 /mk/tools
parent0e8916319a7931f8769858d6ce5f43c9fa571b80 (diff)
downloadpkgsrc-0a8a7fd62a3a335cd8810d08aecf70b776b77cbe.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