summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-pod2html
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-02-12 15:15:37 -0500
committerChristopher Burger <burgerc@freeside.biz>2019-02-12 15:15:37 -0500
commitacb5db886076201922167d39d76fd9b3e9e54c9c (patch)
tree6333d668737e77aab17ab6f92c382d6d7e24c2ed /FS/bin/freeside-pod2html
parent1fe87434632f2627de487ca2aed6cfadea2c6061 (diff)
parentd276a88f98b1c0f553d5f0192b90fc620b60b147 (diff)
Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
Diffstat (limited to 'FS/bin/freeside-pod2html')
-rwxr-xr-xFS/bin/freeside-pod2html47
1 files changed, 47 insertions, 0 deletions
diff --git a/FS/bin/freeside-pod2html b/FS/bin/freeside-pod2html
new file mode 100755
index 000000000..991b9fee8
--- /dev/null
+++ b/FS/bin/freeside-pod2html
@@ -0,0 +1,47 @@
+#!/usr/bin/env perl
+
+=head1 NAME
+
+pod2html.pl
+
+=head1 DESCRIPTION
+
+Generate HTML from POD documentation
+
+=head1 SEE ALSO
+
+L<FS::Misc::Pod2Html>
+
+=cut
+
+use strict;
+use warnings;
+use v5.10;
+
+use FS::Misc::Pod2Html 'fs_pod2html';
+use FS::UID qw( checkuid );
+
+die 'Not running uid freeside!'
+ unless checkuid();
+
+my $html_dir = shift @ARGV
+ or HELP_MESSAGE('Please specify an OUTPUT_DIRECTORY');
+
+HELP_MESSAGE("Directory $html_dir: No write access!")
+ unless -w $html_dir;
+
+fs_pod2html( $html_dir );
+
+sub HELP_MESSAGE {
+ my $error = shift;
+ print " ERROR: $error \n"
+ if $error;
+ print "
+ Generate HTML from Freeside POD documentation
+
+ Usage: pod2html.pl OUTPUT_DIRECTORY
+
+ ";
+ exit;
+}
+