]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Change binary to -kkv status
authorPeter Bernard West <pbwest@apache.org>
Thu, 29 Jan 2004 05:23:28 +0000 (05:23 +0000)
committerPeter Bernard West <pbwest@apache.org>
Thu, 29 Jan 2004 05:23:28 +0000 (05:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197287 13f79535-47bb-0310-9956-ffa450edef68

lic_to_2 [new file with mode: 0644]

diff --git a/lic_to_2 b/lic_to_2
new file mode 100644 (file)
index 0000000..eb36e3a
--- /dev/null
+++ b/lic_to_2
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+use Getopt::Long;
+
+sub usage {
+    print STDERR  "Usage:\n";
+    print STDERR "\t$0 --lic2 <license 2.0 file>\n";
+    exit 1;
+}
+
+&usage unless GetOptions("lic2=s" => \$lic2);
+&usage unless defined($lic2);
+
+die "Can't open $lic2\n" unless open LIC2, "<$lic2";
+
+# Read files without an input record separator
+undef $/;
+
+# Slurp the license file
+$lic2text = <LIC2>;
+($lic2begin = $lic2text) =~ s/^(.*)\{YEARS\}(.*)/$1/s;
+$lic2rem = $2;
+
+# Slurp the input file
+$_ = <>;
+s|\n                    # Start with a newline
+  [^\n]*=+\s+           # Non-newlines followed by multiple '='
+                        # ...followed by whitespace (incl. newline)
+  [^\n]*                # Non-newlines (incl spaces)
+  The\ Apache\ Software\ License,\ Version\ 1\.1
+  .*                    # Anything
+  Copyright\ \(C\)\ (\d+(-\d+)?)\ The\ Apache\ Software\ Foundation
+  .*                    # Anything
+  James\ Tauber
+  .*                    # Anything
+  \<http://www.apache.org/\>\.
+  \s+                   # Any whitespace
+|$lic2begin$1$lic2rem|xs;
+
+print;