diff options
author | Mitch Jackson <mitch@freeside.biz> | 2019-02-03 22:33:37 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2019-02-03 22:45:26 -0500 |
commit | 931c20661727c674528b956965366657566265ba (patch) | |
tree | b6138649f737af7d2c7c5dc304659a5a30ecf92f /FS/bin | |
parent | 9a74b15fe926c37f00added2d034d34bf6c95d7f (diff) |
RT# 81961 Move POD to HTML code into FS::Misc::Pod2Html module
Diffstat (limited to 'FS/bin')
-rwxr-xr-x | FS/bin/freeside-pod2html | 47 |
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; +} + |