From 931c20661727c674528b956965366657566265ba Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Sun, 3 Feb 2019 22:33:37 -0500 Subject: RT# 81961 Move POD to HTML code into FS::Misc::Pod2Html module --- FS/bin/freeside-pod2html | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 FS/bin/freeside-pod2html (limited to 'FS/bin') 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 + +=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; +} + -- cgit v1.2.1