summaryrefslogtreecommitdiff
path: root/Docs/generate-text-files.pl
diff options
context:
space:
mode:
authorjimw@mysql.com <>2006-04-11 18:54:24 -0700
committerjimw@mysql.com <>2006-04-11 18:54:24 -0700
commit276109b155b017a509801b19f76d81feca460707 (patch)
tree24f79d4012d38ba95416a1379bdf4c392e02e0cb /Docs/generate-text-files.pl
parentb02463c15aea36ddcd5b4f7d0f5b4594b5c84f62 (diff)
downloadmariadb-git-276109b155b017a509801b19f76d81feca460707.tar.gz
Remove old cruft from the tree: mysqltestmanager, mysql_test_run_new,
and various stuff in Docs/. Also move the certificates used for testing into mysql-test/std_data from the top-level SSL directory (now gone).
Diffstat (limited to 'Docs/generate-text-files.pl')
-rwxr-xr-xDocs/generate-text-files.pl43
1 files changed, 43 insertions, 0 deletions
diff --git a/Docs/generate-text-files.pl b/Docs/generate-text-files.pl
new file mode 100755
index 00000000000..0829525f679
--- /dev/null
+++ b/Docs/generate-text-files.pl
@@ -0,0 +1,43 @@
+#!/usr/bin/perl -w -*- perl -*-
+# Generate text files from top directory from the manual.
+
+$from = shift(@ARGV);
+$fnode = shift(@ARGV);
+$tnode = shift(@ARGV);
+
+open(IN, "$from") || die "Cannot open $from: $!";
+
+$in = 0;
+
+while (<IN>)
+{
+ if ($in)
+ {
+ if (/Node: $tnode,/ || /\[index/)
+ {
+ $in = 0;
+ }
+ elsif (/^File: mysql.info/ || (/^/))
+ {
+ # Just Skip node beginnings
+ }
+ else
+ {
+ print;
+ }
+ }
+ else
+ {
+ if (/Node: $fnode,/)
+ {
+ $in = 1;
+ # Skip first empty line
+ <IN>;
+ }
+ }
+}
+
+close(IN);
+
+die "Could not find node \"$tnode\"" if ($in == 1);
+exit 0;