diff --git a/docs/source/index.rst b/docs/source/index.rst index f971139ad..048b7095d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,7 @@ -Extreme Cloud/Cluster Administration Toolkit -============================================ +Extreme Cloud Administration Toolkit +==================================== -xCAT stands for E\ **x**\ treme **C**\ loud/\ **C**\ luster **A**\ dministration **T**\ oolkit. +xCAT stands for E\ **x**\ treme **C**\ loud **A**\ dministration **T**\ oolkit. xCAT offers complete management of clouds, clusters, HPC, grids, datacenters, renderfarms, online gaming infrastructure, and whatever tomorrows next buzzword may be. diff --git a/perl-xCAT/README b/perl-xCAT/README index 52f308009..04b56cd36 100644 --- a/perl-xCAT/README +++ b/perl-xCAT/README @@ -1,5 +1,3 @@ -xCAT - eXtreme Cloud Administration Toolkit - xCAT is a toolkit for the deployment and administration of clusters. xCAT documentation is available at: http://xcat-docs.readthedocs.org/ diff --git a/xCAT-OpenStack-baremetal/xpod2man b/xCAT-OpenStack-baremetal/xpod2man index 5a2b973f0..cbec892b8 100755 --- a/xCAT-OpenStack-baremetal/xpod2man +++ b/xCAT-OpenStack-baremetal/xpod2man @@ -9,7 +9,6 @@ use strict; -#use lib '.'; use Pod::Man; use Pod::Html; @@ -20,13 +19,6 @@ my $cachedir = '/tmp'; my @pods = getPodList($poddir); -#foreach (@pods) { print "$_\n"; } exit; - -# Build the cmd overview page. -#writesummarypage("$poddir/man1/xcat.1.pod", @pods); - -# 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; @@ -41,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 @@ -55,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); } @@ -74,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) @@ -134,71 +119,6 @@ sub getPodList { } -# Create the xcat man page that gives a summary description of each xcat cmd. -# Not used -sub writesummarypage { - my $file = shift; # relative path file name of the man page - # the rest of @_ contains the pod files that describe each cmd - - open(FILE, ">$file") or die "Error: could not open $file for writing.\n"; - - print FILE <<'EOS1'; -=head1 NAME - -B - extreme Cluster Administration Tool. - -=head1 DESCRIPTION - -Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management -and provisioning tool that provides a unified interface for hardware control, discovery, and -OS diskful/diskfree deployment. - - -=head1 XCAT DATABASE - -All of the cluster configuration information is in the xCAT database. See L for -descriptions of every table in the database. - -=head1 XCAT COMMANDS - -What follows is a short description of each xCAT command. To get more information about a particular -command, see its man page. Note that the commands are listed in alphabetical order B, -i.e. all the commands in section 1, then the commands in section 3, etc. - -=over 12 -EOS1 - - # extract the summary for each cmd from its man page - foreach my $manpage (@_) { - my ($sectionnum) = $manpage =~ /\.(\d+)\.pod$/; - - # Suck in the whole file, then we will parse it. - open(MANPAGE, "$manpage") or die "Error: could not open $manpage for reading.\n"; - my @contents = ; - my $wholemanpage = join('', @contents); - close(MANPAGE); - - # This regex matches: optional space, =head1, space, title, space, cmd, space, description, newline - my ($cmd, $description) = $wholemanpage =~ /^\s*=head1\s+\S+\s+(\S+)\s+(.+?)\n/si; - if (!defined($cmd)) { print "Warning: $manpage is not in a recognized structure. It will be ignored.\n"; next; } - if (!defined($description)) { print "Warning: $manpage does not have a description for $cmd. It will be ignored.\n"; next; } - $cmd =~ s/^.<(.+)>$/$1/; # if the cmd name has pod formatting around it, strip it off - $description =~ s/^-\s*//; # if the description has a leading hypen, strip it off - print FILE "\n=item L<$cmd($sectionnum)|$cmd.$sectionnum>\n\n" . $description . "\n"; - } - - # Artificially add the xcattest cmd, because the xCAT-test rpm will add this - print FILE "\n=item L\n\nRun automated xCAT test cases.\n"; - - print FILE <<"EOS3"; - -=back -EOS3 - - close FILE; -} - - # Create the html page for one pod. sub convertpod2html { my ($podfile, $htmlfile, $poddir, $htmldir) = @_; diff --git a/xCAT-SoftLayer/xpod2man b/xCAT-SoftLayer/xpod2man index d867fd448..f28a08a72 100755 --- a/xCAT-SoftLayer/xpod2man +++ b/xCAT-SoftLayer/xpod2man @@ -9,7 +9,6 @@ use strict; -#use lib '.'; use Pod::Man; use Pod::Html; @@ -21,13 +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 cmd overview page. -#writesummarypage("$poddir/man1/xcat.1.pod", @pods); - -# 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; @@ -42,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 @@ -56,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); } @@ -75,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) @@ -134,72 +119,6 @@ sub getPodList { return sort @files; } - -# Create the xcat man page that gives a summary description of each xcat cmd. -# Not used. -sub writesummarypage { - my $file = shift; # relative path file name of the man page - # the rest of @_ contains the pod files that describe each cmd - - open(FILE, ">$file") or die "Error: could not open $file for writing.\n"; - - print FILE <<'EOS1'; -=head1 NAME - -B - extreme Cluster Administration Tool. - -=head1 DESCRIPTION - -Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management -and provisioning tool that provides a unified interface for hardware control, discovery, and -OS diskful/diskfree deployment. - - -=head1 XCAT DATABASE - -All of the cluster configuration information is in the xCAT database. See L for -descriptions of every table in the database. - -=head1 XCAT COMMANDS - -What follows is a short description of each xCAT command. To get more information about a particular -command, see its man page. Note that the commands are listed in alphabetical order B, -i.e. all the commands in section 1, then the commands in section 3, etc. - -=over 12 -EOS1 - - # extract the summary for each cmd from its man page - foreach my $manpage (@_) { - my ($sectionnum) = $manpage =~ /\.(\d+)\.pod$/; - - # Suck in the whole file, then we will parse it. - open(MANPAGE, "$manpage") or die "Error: could not open $manpage for reading.\n"; - my @contents = ; - my $wholemanpage = join('', @contents); - close(MANPAGE); - - # This regex matches: optional space, =head1, space, title, space, cmd, space, description, newline - my ($cmd, $description) = $wholemanpage =~ /^\s*=head1\s+\S+\s+(\S+)\s+(.+?)\n/si; - if (!defined($cmd)) { print "Warning: $manpage is not in a recognized structure. It will be ignored.\n"; next; } - if (!defined($description)) { print "Warning: $manpage does not have a description for $cmd. It will be ignored.\n"; next; } - $cmd =~ s/^.<(.+)>$/$1/; # if the cmd name has pod formatting around it, strip it off - $description =~ s/^-\s*//; # if the description has a leading hypen, strip it off - print FILE "\n=item L<$cmd($sectionnum)|$cmd.$sectionnum>\n\n" . $description . "\n"; - } - - # Artificially add the xcattest cmd, because the xCAT-test rpm will add this - print FILE "\n=item L\n\nRun automated xCAT test cases.\n"; - - print FILE <<"EOS3"; - -=back -EOS3 - - close FILE; -} - - # Create the html page for one pod. sub convertpod2html { my ($podfile, $htmlfile, $poddir, $htmldir) = @_; diff --git a/xCAT-UI/debian/control b/xCAT-UI/debian/control index f9fe95278..d0020859d 100644 --- a/xCAT-UI/debian/control +++ b/xCAT-UI/debian/control @@ -9,5 +9,4 @@ Package: xcat-ui Architecture: all Depends: ${perl:Depends}, python (>= 2.3), apache2, libapache2-mod-php Description: Provides a browser-based interface for xCAT - Provides a browser-based interface for xCAT (extreme Cluster Administration - Tool). + Provides a browser-based interface for xCAT. diff --git a/xCAT-UI/lib/ui.php b/xCAT-UI/lib/ui.php index 458105a75..f7f96f3a1 100644 --- a/xCAT-UI/lib/ui.php +++ b/xCAT-UI/lib/ui.php @@ -72,7 +72,7 @@ function login() {
- + diff --git a/xCAT-UI/service.php b/xCAT-UI/service.php index 558d39f85..ed9cc89bd 100644 --- a/xCAT-UI/service.php +++ b/xCAT-UI/service.php @@ -57,7 +57,7 @@ if (!isAuthenticated()) {
eXtreme Cloud Administration Toolkit
xCAT
- + diff --git a/xCAT-UI/xCAT-UI.spec b/xCAT-UI/xCAT-UI.spec index 15b714315..a39fb564c 100644 --- a/xCAT-UI/xCAT-UI.spec +++ b/xCAT-UI/xCAT-UI.spec @@ -31,7 +31,7 @@ Requires: httpd %endif %description -Provides a browser-based interface for xCAT (Extreme Cloud Administration Toolkit). +Provides a browser-based interface for xCAT. %prep %setup -q -n xCAT-UI diff --git a/xCAT-client/xpod2man b/xCAT-client/xpod2man index d7ee05ea9..908804ba7 100755 --- a/xCAT-client/xpod2man +++ b/xCAT-client/xpod2man @@ -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) @@ -149,11 +137,11 @@ sub writesummarypage { print FILE <<'EOS1'; =head1 NAME -B - extreme Cluster Administration Tool. +B - Extreme Cloud Administration Toolkit. =head1 DESCRIPTION -Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management +Extreme Cloud Administration Toolkit (xCAT). xCAT is a scalable distributed computing management and provisioning tool that provides a unified interface for hardware control, discovery, and OS diskful/diskfree deployment. diff --git a/xCAT-confluent/xpod2man b/xCAT-confluent/xpod2man index d49af7443..346bb674e 100755 --- a/xCAT-confluent/xpod2man +++ b/xCAT-confluent/xpod2man @@ -9,7 +9,6 @@ use strict; -#use lib '.'; use Pod::Man; use Pod::Html; @@ -20,13 +19,6 @@ my $cachedir = '/tmp'; my @pods = getPodList($poddir); -#foreach (@pods) { print "$_\n"; } exit; - -# Build the cmd overview page. -#writesummarypage("$poddir/man1/xcat.1.pod", @pods); - -# 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; @@ -41,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 @@ -55,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); } @@ -74,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; } } } @@ -133,71 +116,6 @@ sub getPodList { return sort @files; } - -# Create the xcat man page that gives a summary description of each xcat cmd. -sub writesummarypage { - my $file = shift; # relative path file name of the man page - # the rest of @_ contains the pod files that describe each cmd - - open(FILE, ">$file") or die "Error: could not open $file for writing.\n"; - - print FILE <<'EOS1'; -=head1 NAME - -B - extreme Cluster Administration Tool. - -=head1 DESCRIPTION - -Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management -and provisioning tool that provides a unified interface for hardware control, discovery, and -OS diskful/diskfree deployment. - - -=head1 XCAT DATABASE - -All of the cluster configuration information is in the xCAT database. See L for -descriptions of every table in the database. - -=head1 XCAT COMMANDS - -What follows is a short description of each xCAT command. To get more information about a particular -command, see its man page. Note that the commands are listed in alphabetical order B, -i.e. all the commands in section 1, then the commands in section 3, etc. - -=over 12 -EOS1 - - # extract the summary for each cmd from its man page - foreach my $manpage (@_) { - my ($sectionnum) = $manpage =~ /\.(\d+)\.pod$/; - - # Suck in the whole file, then we will parse it. - open(MANPAGE, "$manpage") or die "Error: could not open $manpage for reading.\n"; - my @contents = ; - my $wholemanpage = join('', @contents); - close(MANPAGE); - - # This regex matches: optional space, =head1, space, title, space, cmd, space, description, newline - my ($cmd, $description) = $wholemanpage =~ /^\s*=head1\s+\S+\s+(\S+)\s+(.+?)\n/si; - if (!defined($cmd)) { print "Warning: $manpage is not in a recognized structure. It will be ignored.\n"; next; } - if (!defined($description)) { print "Warning: $manpage does not have a description for $cmd. It will be ignored.\n"; next; } - $cmd =~ s/^.<(.+)>$/$1/; # if the cmd name has pod formatting around it, strip it off - $description =~ s/^-\s*//; # if the description has a leading hypen, strip it off - print FILE "\n=item L<$cmd($sectionnum)|$cmd.$sectionnum>\n\n" . $description . "\n"; - } - - # Artificially add the xcattest cmd, because the xCAT-test rpm will add this - print FILE "\n=item L\n\nRun automated xCAT test cases.\n"; - - print FILE <<"EOS3"; - -=back -EOS3 - - close FILE; -} - - # Create the html page for one pod. sub convertpod2html { my ($podfile, $htmlfile, $poddir, $htmldir) = @_; diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 715e5745a..add91c1af 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -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 (Extreme Cloud/Cluster Administration Toolkit): - Full documentation at: + xCAT: http://xcat.org + Full documentation at: http://xcat-docs.readthedocs.io/en/stable EOF } diff --git a/xCAT-vlan/xpod2man b/xCAT-vlan/xpod2man index 36a5a78a2..1135f3957 100755 --- a/xCAT-vlan/xpod2man +++ b/xCAT-vlan/xpod2man @@ -9,7 +9,6 @@ use strict; -#use lib '.'; use Pod::Man; use Pod::Html; @@ -21,13 +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 cmd overview page. -#writesummarypage("$poddir/man1/xcat.1.pod", @pods); - -# 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; @@ -42,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 @@ -56,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); } @@ -75,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; } } } @@ -134,71 +117,6 @@ sub getPodList { return sort @files; } - -# Create the xcat man page that gives a summary description of each xcat cmd. -sub writesummarypage { - my $file = shift; # relative path file name of the man page - # the rest of @_ contains the pod files that describe each cmd - - open(FILE, ">$file") or die "Error: could not open $file for writing.\n"; - - print FILE <<'EOS1'; -=head1 NAME - -B - extreme Cluster Administration Tool. - -=head1 DESCRIPTION - -Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management -and provisioning tool that provides a unified interface for hardware control, discovery, and -OS diskful/diskfree deployment. - - -=head1 XCAT DATABASE - -All of the cluster configuration information is in the xCAT database. See L for -descriptions of every table in the database. - -=head1 XCAT COMMANDS - -What follows is a short description of each xCAT command. To get more information about a particular -command, see its man page. Note that the commands are listed in alphabetical order B, -i.e. all the commands in section 1, then the commands in section 3, etc. - -=over 12 -EOS1 - - # extract the summary for each cmd from its man page - foreach my $manpage (@_) { - my ($sectionnum) = $manpage =~ /\.(\d+)\.pod$/; - - # Suck in the whole file, then we will parse it. - open(MANPAGE, "$manpage") or die "Error: could not open $manpage for reading.\n"; - my @contents = ; - my $wholemanpage = join('', @contents); - close(MANPAGE); - - # This regex matches: optional space, =head1, space, title, space, cmd, space, description, newline - my ($cmd, $description) = $wholemanpage =~ /^\s*=head1\s+\S+\s+(\S+)\s+(.+?)\n/si; - if (!defined($cmd)) { print "Warning: $manpage is not in a recognized structure. It will be ignored.\n"; next; } - if (!defined($description)) { print "Warning: $manpage does not have a description for $cmd. It will be ignored.\n"; next; } - $cmd =~ s/^.<(.+)>$/$1/; # if the cmd name has pod formatting around it, strip it off - $description =~ s/^-\s*//; # if the description has a leading hypen, strip it off - print FILE "\n=item L<$cmd($sectionnum)|$cmd.$sectionnum>\n\n" . $description . "\n"; - } - - # Artificially add the xcattest cmd, because the xCAT-test rpm will add this - print FILE "\n=item L\n\nRun automated xCAT test cases.\n"; - - print FILE <<"EOS3"; - -=back -EOS3 - - close FILE; -} - - # Create the html page for one pod. sub convertpod2html { my ($podfile, $htmlfile, $poddir, $htmldir) = @_;
eXtreme Cloud Administration Toolkit
xCAT