mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-23 02:00:56 +08:00
Merged & fixed pod2rst-updated
This commit is contained in:
21
docs/dev/how-to-fatpack-pod2rst
Normal file
21
docs/dev/how-to-fatpack-pod2rst
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
$ cpanm App::FatPacker
|
||||||
|
$ mkdir /tmp/pod2rst
|
||||||
|
$ cp util/pod2rst-fixed /tmp/pod2rst/
|
||||||
|
$ cd /tmp/pod2rst
|
||||||
|
$ mkdir lib
|
||||||
|
$ fatpack trace pod2rst-fixed
|
||||||
|
$ fatpack packlists-for `cat fatpacker.trace` >packlists
|
||||||
|
$ fatpack tree `cat packlists`
|
||||||
|
$ (fatpack file; cat pod2rst-fixed) > pod2rst-fixed.packed
|
||||||
|
$ cp pod2rst-fixed.packed ~/percona-toolkit/util/
|
||||||
|
$ cd ~/
|
||||||
|
$ rm -rf /tmp/pod2rst
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
1. Don't do this from the root of the bzr repo. fatpack tries to be clever
|
||||||
|
and inlines everything under lib/
|
||||||
|
2. mkdir lib/ is to get around a bug(?) in fatpack
|
||||||
|
3. these two lines are safe to ignore:
|
||||||
|
File /tmp/pod2rst/fatlib/darwin-thread-multi-2level/auto/HTML/Parser/Parser.bs isn't a .pm file - can't pack this and if you hoped we were going to things may not be what you expected later
|
||||||
|
File /tmp/pod2rst/fatlib/darwin-thread-multi-2level/auto/HTML/Parser/Parser.bundle isn't a .pm file - can't pack this and if you hoped we were going to things may not be what you expected later
|
||||||
@@ -6,8 +6,6 @@ use English qw(-no_match_vars);
|
|||||||
|
|
||||||
use IO::File;
|
use IO::File;
|
||||||
|
|
||||||
use HTML::Entities;
|
|
||||||
|
|
||||||
use File::Basename qw(basename);
|
use File::Basename qw(basename);
|
||||||
use Pod::POM::View::Restructured;
|
use Pod::POM::View::Restructured;
|
||||||
|
|
||||||
|
|||||||
5769
util/pod2rst-fixed.packed
Executable file
5769
util/pod2rst-fixed.packed
Executable file
File diff suppressed because it is too large
Load Diff
@@ -91,7 +91,7 @@ write_rst() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$BRANCH/util/pod2rst-fixed $file > $RST_DIR/$tool.rst
|
$BRANCH/util/pod2rst-fixed.packed $file > $RST_DIR/$tool.rst
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Wrote $RST_DIR/$tool.rst"
|
echo "Wrote $RST_DIR/$tool.rst"
|
||||||
else
|
else
|
||||||
@@ -121,7 +121,7 @@ write_sections() {
|
|||||||
$BRANCH/util/extract-text $DOCS_DIR/percona-toolkit.pod "^=head1 $header" "^=head1|=cut" > /tmp/$filename.pod
|
$BRANCH/util/extract-text $DOCS_DIR/percona-toolkit.pod "^=head1 $header" "^=head1|=cut" > /tmp/$filename.pod
|
||||||
|
|
||||||
# Convert POD to RST and remove all the Perl highlight blocks.
|
# Convert POD to RST and remove all the Perl highlight blocks.
|
||||||
cat /tmp/$filename.pod | pod2rst | sed -e 's/.. highlight:: perl//g' > /tmp/$filename.tmp
|
$BRANCH/util/pod2rst-fixed.packed /tmp/$filename.pod | sed -e 's/.. highlight:: perl//g' > /tmp/$filename.tmp
|
||||||
|
|
||||||
# Remove extra blank lines.
|
# Remove extra blank lines.
|
||||||
cat -s /tmp/$filename.tmp > $RST_DIR/$filename.rst
|
cat -s /tmp/$filename.tmp > $RST_DIR/$filename.rst
|
||||||
|
|||||||
Reference in New Issue
Block a user