corrected verification examples
[gnutls.git] / doc / scripts / cleanup-autogen.pl
blob6f38f5e1f11212d02d1c397601f97856bdadd591
1 eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
2 & eval 'exec perl -wS "$0" $argv:q'
3 if 0;
5 # Copyright (C) 2012 Free Software Foundation, Inc.
7 # This file is part of GnuTLS.
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # This file is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this file; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 my $line;
24 my $init = 0;
25 my $menu = 0;
26 my $i = 0;
28 while ($line = <>) {
29 if ($line =~ /\@node (.*)/) {
30 if ($init == 0) {
31 $init = 1;
32 } else {
33 print "\@anchor\{$1\}\n";
34 next;
38 if ($line =~ /\@menu/) {
39 $menu = 1;
40 next;
43 if ($line =~ /\@end menu/) {
44 $menu = 0;
45 next;
48 next if ($menu != 0);
50 if ($line =~ /\@subsection\s(.*)/) {
51 $line = "\@subheading $1\n";
54 if ($line =~ /\@cindex\s(.*)/) {
55 if ($line !~ /help/) {
56 next;
60 print $line;
61 $i++;
64 if ($i < 2) {
65 exit 1;
68 exit 0;