summaryrefslogtreecommitdiff
path: root/doc/scripts
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-14 12:05:13 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-14 12:05:13 +0100
commita4bc93184738e4226e1a8079c68ff4be2c9c2b53 (patch)
tree465ed782292130b5cc78eae61c31fea68e322ad0 /doc/scripts
parentd77d792c4abc6a198309501bd293dbf0252436b8 (diff)
downloadgnutls-a4bc93184738e4226e1a8079c68ff4be2c9c2b53.tar.gz
updated documentation for included programs.
Diffstat (limited to 'doc/scripts')
-rwxr-xr-xdoc/scripts/cleanup-autogen.pl53
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/scripts/cleanup-autogen.pl b/doc/scripts/cleanup-autogen.pl
new file mode 100755
index 0000000000..7d2d43a010
--- /dev/null
+++ b/doc/scripts/cleanup-autogen.pl
@@ -0,0 +1,53 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is part of GnuTLS.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+my $line;
+my $init = 0;
+my $menu = 0;
+
+while ($line = <>) {
+ if ($line =~ /\@node/) {
+ if ($init == 0) {
+ $init = 1;
+ } else {
+ next;
+ }
+ }
+
+ if ($line =~ /\@menu/) {
+ $menu = 1;
+ next;
+ }
+
+ if ($line =~ /\@end menu/) {
+ $menu = 0;
+ next;
+ }
+
+ next if ($menu != 0);
+
+ if ($line =~ /\@subsection\s(.*)/) {
+ $line = "\@subheading $1\n";
+ }
+
+ print $line;
+}