aboutsummaryrefslogtreecommitdiffstats
path: root/copypage.pl
diff options
context:
space:
mode:
authorPeter Karlsson <peterk>2001-04-01 01:31:09 +0000
committerPeter Karlsson <peterk>2001-04-01 01:31:09 +0000
commite13f493e22a9b99aed9a4f399d40c71d409d8df3 (patch)
treec2a1ce5636e6b1546da5f137cbdcd2d67960d598 /copypage.pl
parentff37faf65cb5cae5cab185b4e42aeb3c09f16a13 (diff)
More magic to insert the translation-check header at the right place - it
should always be inserted after all initial <define-tag> and #use statements, before the body contents starts. CVS version numbers copypage.pl: 1.9 -> 1.10
Diffstat (limited to 'copypage.pl')
-rwxr-xr-xcopypage.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/copypage.pl b/copypage.pl
index 5621c369376..26cfae45f4e 100755
--- a/copypage.pl
+++ b/copypage.pl
@@ -6,7 +6,7 @@
# Makefile from the source.
# Written on 2000-02-26 by peter karlsson <peter@softwolves.pp.se>
-# © Copyright 2000 Software in the public interest, Inc.
+# © Copyright 2000-2001 Software in the public interest, Inc.
# This program is released under the GNU General Public License, v2.
# $Id$
@@ -124,15 +124,24 @@ sub copy
# Copy the file and insert the revision number
my $insertedrevision = 0;
+ my $isdefinetag = 0;
+ my $ignorews = 0;
while (<SRC>)
{
- unless ($insertedrevision || /^#/ || /^<define/)
+ $isdefinetag = 1 if /<define-tag/;
+ $ignorews = 1 if $isdefinetag;
+
+ unless ($insertedrevision || /^#/ || $isdefinetag ||
+ ($ignorews && /^$/))
{
print DST qq'#use wml::debian::translation-check translation="$revision"\n';
$insertedrevision = 1;
}
print DST $_;
+
+ $isdefinetag = 0 if m'</define-tag>';
+ $ignorews = 0 if /^#/;
}
close SRC;

© 2014-2024 Faster IT GmbH | imprint | privacy policy