mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Remove commented out lines
This commit is contained in:
		| @@ -9,7 +9,6 @@ | ||||
|  | ||||
| use strict; | ||||
|  | ||||
| #use lib '.'; | ||||
| use Pod::Man; | ||||
| use Pod::Html; | ||||
|  | ||||
| @@ -20,10 +19,6 @@ my $cachedir = '/tmp'; | ||||
|  | ||||
| my @pods = getPodList($poddir); | ||||
|  | ||||
| #foreach (@pods) { print "$_\n"; } exit; | ||||
|  | ||||
| # Build the man page for each pod. | ||||
| #mkdir($mandir) or die "Error: could not create $mandir.\n"; | ||||
| print "Converting PODs to man pages...\n"; | ||||
| foreach my $podfile (@pods) { | ||||
|     my $manfile = $podfile; | ||||
| @@ -38,8 +33,6 @@ foreach my $podfile (@pods) { | ||||
|  | ||||
| my @dummyPods = createDummyPods($poddir, \@pods); | ||||
|  | ||||
| # Build the html page for each pod. | ||||
| #mkdir($htmldir) or die "Error: could not create $htmldir.\n"; | ||||
| print "Converting PODs to HTML pages...\n"; | ||||
|  | ||||
| # have to clear the cache, because old entries can cause a problem | ||||
| @@ -52,7 +45,6 @@ foreach my $podfile (@pods) { | ||||
|     $hdir =~ s|/[^/]*$||;                 # get rid of the basename part | ||||
|     if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; } | ||||
|  | ||||
|     #print "$podfile, $htmlfile, $poddir, $htmldir\n"; | ||||
|     convertpod2html($podfile, $htmlfile, $poddir, $htmldir); | ||||
| } | ||||
|  | ||||
| @@ -71,16 +63,12 @@ sub createDummyPods { | ||||
|     my ($poddir, $pods) = @_; | ||||
|     my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir; | ||||
|  | ||||
|     #print "Running cmd: ", $cmd, "\n"; | ||||
|     my @lines = `$cmd`; | ||||
|     if ($?) { print "Did not find any section 5 man page, creating dummy pods...\n"; print join('', @lines); } | ||||
|  | ||||
|     #my @lines; | ||||
|     #system($cmd); | ||||
|     my @dummyPods; | ||||
|     foreach my $l (@lines) { | ||||
|  | ||||
|         #print "$l\n"; | ||||
|         my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line | ||||
|           # The above line should create the array with every other entry being the man page name | ||||
|           # and every other entry is the section # (5 or 7) | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
|  | ||||
| use strict; | ||||
|  | ||||
| #use lib '.'; | ||||
| use Pod::Man; | ||||
| use Pod::Html; | ||||
|  | ||||
| @@ -21,10 +20,6 @@ if (system("mkdir -p $cachedir")) { die "Error: could not create $cachedir.\n"; | ||||
|  | ||||
| my @pods = getPodList($poddir); | ||||
|  | ||||
| #foreach (@pods) { print "$_\n"; } exit; | ||||
|  | ||||
| # Build the man page for each pod. | ||||
| #mkdir($mandir) or die "Error: could not create $mandir.\n"; | ||||
| print "Converting PODs to man pages...\n"; | ||||
| foreach my $podfile (@pods) { | ||||
|     my $manfile = $podfile; | ||||
| @@ -39,8 +34,6 @@ foreach my $podfile (@pods) { | ||||
|  | ||||
| my @dummyPods = createDummyPods($poddir, \@pods); | ||||
|  | ||||
| # Build the html page for each pod. | ||||
| #mkdir($htmldir) or die "Error: could not create $htmldir.\n"; | ||||
| print "Converting PODs to HTML pages...\n"; | ||||
|  | ||||
| # have to clear the cache, because old entries can cause a problem | ||||
| @@ -53,7 +46,6 @@ foreach my $podfile (@pods) { | ||||
|     $hdir =~ s|/[^/]*$||;                 # get rid of the basename part | ||||
|     if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; } | ||||
|  | ||||
|     #print "$podfile, $htmlfile, $poddir, $htmldir\n"; | ||||
|     convertpod2html($podfile, $htmlfile, $poddir, $htmldir); | ||||
| } | ||||
|  | ||||
| @@ -72,16 +64,12 @@ sub createDummyPods { | ||||
|     my ($poddir, $pods) = @_; | ||||
|     my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir; | ||||
|  | ||||
|     #print "Running cmd: ", $cmd, "\n"; | ||||
|     my @lines = `$cmd`; | ||||
|     if ($?) { print "Did not find any section 5 man page, creating dummy pods...\n"; print join('', @lines); } | ||||
|  | ||||
|     #my @lines; | ||||
|     #system($cmd); | ||||
|     my @dummyPods; | ||||
|     foreach my $l (@lines) { | ||||
|  | ||||
|         #print "$l\n"; | ||||
|         my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line | ||||
|           # The above line should create the array with every other entry being the man page name | ||||
|           # and every other entry is the section # (5 or 7) | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
|  | ||||
| use strict; | ||||
|  | ||||
| #use lib '.'; | ||||
| use Pod::Man; | ||||
| use Pod::Html; | ||||
|  | ||||
| @@ -21,14 +20,10 @@ if (system("mkdir -p $cachedir")) { die "Error: could not create $cachedir.\n"; | ||||
|  | ||||
| my @pods = getPodList($poddir); | ||||
|  | ||||
| #foreach (@pods) { print "$_\n"; } exit; | ||||
|  | ||||
| # Build the cmd overview page. | ||||
| writesummarypage("$poddir/man1/xcat.1.pod", @pods); | ||||
| push @pods, "$poddir/man1/xcat.1.pod"; | ||||
|  | ||||
| # Build the man page for each pod. | ||||
| #mkdir($mandir) or die "Error: could not create $mandir.\n"; | ||||
| print "Converting PODs to man pages...\n"; | ||||
| foreach my $podfile (@pods) { | ||||
|     my $manfile = $podfile; | ||||
| @@ -43,8 +38,6 @@ foreach my $podfile (@pods) { | ||||
|  | ||||
| my @dummyPods = createDummyPods($poddir, \@pods); | ||||
|  | ||||
| # Build the html page for each pod. | ||||
| #mkdir($htmldir) or die "Error: could not create $htmldir.\n"; | ||||
| print "Converting PODs to HTML pages...\n"; | ||||
|  | ||||
| # have to clear the cache, because old entries can cause a problem | ||||
| @@ -57,7 +50,6 @@ foreach my $podfile (@pods) { | ||||
|     $hdir =~ s|/[^/]*$||;                 # get rid of the basename part | ||||
|     if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; } | ||||
|  | ||||
|     #print "$podfile, $htmlfile, $poddir, $htmldir\n"; | ||||
|     convertpod2html($podfile, $htmlfile, $poddir, $htmldir); | ||||
| } | ||||
|  | ||||
| @@ -76,16 +68,12 @@ sub createDummyPods { | ||||
|     my ($poddir, $pods) = @_; | ||||
|     my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir; | ||||
|  | ||||
|     #print "Running cmd: ", $cmd, "\n"; | ||||
|     my @lines = `$cmd`; | ||||
|     if ($?) { print "Did not find any section 5 man page, creating dummy pods...\n"; print join('', @lines); } | ||||
|  | ||||
|     #my @lines; | ||||
|     #system($cmd); | ||||
|     my @dummyPods; | ||||
|     foreach my $l (@lines) { | ||||
|  | ||||
|         #print "$l\n"; | ||||
|         my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line | ||||
|           # The above line should create the array with every other entry being the man page name | ||||
|           # and every other entry is the section # (5 or 7) | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
|  | ||||
| use strict; | ||||
|  | ||||
| #use lib '.'; | ||||
| use Pod::Man; | ||||
| use Pod::Html; | ||||
|  | ||||
| @@ -20,10 +19,6 @@ my $cachedir = '/tmp'; | ||||
|  | ||||
| my @pods = getPodList($poddir); | ||||
|  | ||||
| #foreach (@pods) { print "$_\n"; } exit; | ||||
|  | ||||
| # Build the man page for each pod. | ||||
| #mkdir($mandir) or die "Error: could not create $mandir.\n"; | ||||
| print "Converting PODs to man pages...\n"; | ||||
| foreach my $podfile (@pods) { | ||||
|     my $manfile = $podfile; | ||||
| @@ -38,8 +33,6 @@ foreach my $podfile (@pods) { | ||||
|  | ||||
| my @dummyPods = createDummyPods($poddir, \@pods); | ||||
|  | ||||
| # Build the html page for each pod. | ||||
| #mkdir($htmldir) or die "Error: could not create $htmldir.\n"; | ||||
| print "Converting PODs to HTML pages...\n"; | ||||
|  | ||||
| # have to clear the cache, because old entries can cause a problem | ||||
| @@ -52,7 +45,6 @@ foreach my $podfile (@pods) { | ||||
|     $hdir =~ s|/[^/]*$||;                 # get rid of the basename part | ||||
|     if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; } | ||||
|  | ||||
|     #print "$podfile, $htmlfile, $poddir, $htmldir\n"; | ||||
|     convertpod2html($podfile, $htmlfile, $poddir, $htmldir); | ||||
| } | ||||
|  | ||||
| @@ -71,27 +63,21 @@ sub createDummyPods { | ||||
|     my ($poddir, $pods) = @_; | ||||
|     my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir; | ||||
|  | ||||
|     #print "Running cmd: ", $cmd, "\n"; | ||||
|     my @lines = `$cmd`; | ||||
|     if ($?) { print "Did not find any section 5 man page, creating dummy pods...\n"; print join('', @lines); } | ||||
|  | ||||
|     #my @lines; | ||||
|     #system($cmd); | ||||
|     my @dummyPods; | ||||
|     foreach my $l (@lines) { | ||||
|  | ||||
|         #print "$l\n"; | ||||
|         my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line | ||||
|           # The above line should create the array with every other entry being the man page name | ||||
|           # and every other entry is the section # (5 or 7) | ||||
|         my $cmd; | ||||
|         while ($cmd = shift @matches) { | ||||
|  | ||||
|             #foreach my $m (@matches) { | ||||
|             my $section  = shift @matches; | ||||
|             my $filename = "$poddir/man$section/$cmd.$section.pod"; | ||||
|  | ||||
|             #print "$filename\n"; | ||||
|             if (!(grep /^$filename$/, @$pods) && !(grep /^$filename$/, @dummyPods)) { push @dummyPods, $filename; } | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -63,8 +63,8 @@ function usage() | ||||
| 	  ${script} --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 \\ | ||||
| 	          --xcat-dep=http://xcat.org/path/to/xcat-dep.tar.bz2 install | ||||
|  | ||||
| 	xCAT: <http://xcat.org/> | ||||
| 	Full documentation at: <http://xcat-docs.readthedocs.io/en/stable/> | ||||
| 	xCAT: http://xcat.org | ||||
| 	Full documentation at: http://xcat-docs.readthedocs.io/en/stable | ||||
| 	EOF | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
|  | ||||
| use strict; | ||||
|  | ||||
| #use lib '.'; | ||||
| use Pod::Man; | ||||
| use Pod::Html; | ||||
|  | ||||
| @@ -21,10 +20,6 @@ if (system("mkdir -p $cachedir")) { die "Error: could not create $cachedir.\n"; | ||||
|  | ||||
| my @pods = getPodList($poddir); | ||||
|  | ||||
| #foreach (@pods) { print "$_\n"; } exit; | ||||
|  | ||||
| # Build the man page for each pod. | ||||
| #mkdir($mandir) or die "Error: could not create $mandir.\n"; | ||||
| print "Converting PODs to man pages...\n"; | ||||
| foreach my $podfile (@pods) { | ||||
|     my $manfile = $podfile; | ||||
| @@ -39,8 +34,6 @@ foreach my $podfile (@pods) { | ||||
|  | ||||
| my @dummyPods = createDummyPods($poddir, \@pods); | ||||
|  | ||||
| # Build the html page for each pod. | ||||
| #mkdir($htmldir) or die "Error: could not create $htmldir.\n"; | ||||
| print "Converting PODs to HTML pages...\n"; | ||||
|  | ||||
| # have to clear the cache, because old entries can cause a problem | ||||
| @@ -53,7 +46,6 @@ foreach my $podfile (@pods) { | ||||
|     $hdir =~ s|/[^/]*$||;                 # get rid of the basename part | ||||
|     if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; } | ||||
|  | ||||
|     #print "$podfile, $htmlfile, $poddir, $htmldir\n"; | ||||
|     convertpod2html($podfile, $htmlfile, $poddir, $htmldir); | ||||
| } | ||||
|  | ||||
| @@ -72,27 +64,21 @@ sub createDummyPods { | ||||
|     my ($poddir, $pods) = @_; | ||||
|     my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir; | ||||
|  | ||||
|     #print "Running cmd: ", $cmd, "\n"; | ||||
|     my @lines = `$cmd`; | ||||
|     if ($?) { print "Did not find any section 5 man page, creating dummy pods...\n"; print join('', @lines); } | ||||
|  | ||||
|     #my @lines; | ||||
|     #system($cmd); | ||||
|     my @dummyPods; | ||||
|     foreach my $l (@lines) { | ||||
|  | ||||
|         #print "$l\n"; | ||||
|         my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line | ||||
|           # The above line should create the array with every other entry being the man page name | ||||
|           # and every other entry is the section # (5 or 7) | ||||
|         my $cmd; | ||||
|         while ($cmd = shift @matches) { | ||||
|  | ||||
|             #foreach my $m (@matches) { | ||||
|             my $section  = shift @matches; | ||||
|             my $filename = "$poddir/man$section/$cmd.$section.pod"; | ||||
|  | ||||
|             #print "$filename\n"; | ||||
|             if (!(grep /^$filename$/, @$pods) && !(grep /^$filename$/, @dummyPods)) { push @dummyPods, $filename; } | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user