summaryrefslogtreecommitdiff
path: root/FS/bin
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2019-02-03 22:33:37 -0500
committerMitch Jackson <mitch@freeside.biz>2019-02-03 22:45:26 -0500
commit931c20661727c674528b956965366657566265ba (patch)
treeb6138649f737af7d2c7c5dc304659a5a30ecf92f /FS/bin
parent9a74b15fe926c37f00added2d034d34bf6c95d7f (diff)
RT# 81961 Move POD to HTML code into FS::Misc::Pod2Html module
Diffstat (limited to 'FS/bin')
-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;
+}
+