summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/HTMLify.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-05 13:02:35 +0000
committerfukachan <fukachan>2001-11-05 13:02:35 +0000
commit376a70b80152784736d30aef5c18e3188024bf18 (patch)
treec352fc044d3856c591367d2a53b3546e9d8e77bb /fml/lib/FML/Process/HTMLify.pm
parentc76984fd0d7121b99d6c1b263231760686ac98d1 (diff)
downloadfml8-376a70b80152784736d30aef5c18e3188024bf18.tar.gz
fml8-376a70b80152784736d30aef5c18e3188024bf18.tar.bz2
fml8-376a70b80152784736d30aef5c18e3188024bf18.zip
fmlhtmlify [-I dir]
Diffstat (limited to 'fml/lib/FML/Process/HTMLify.pm')
-rw-r--r--fml/lib/FML/Process/HTMLify.pm28
1 files changed, 22 insertions, 6 deletions
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index d904ab47..4b5fa68d 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -4,7 +4,7 @@
# Copyright (C) 2000-2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.4 2001/11/04 13:41:32 fukachan Exp $
+# $FML: HTMLify.pm,v 1.1 2001/11/05 12:26:38 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -80,9 +80,18 @@ sub run
{
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
+ my $options = $curproc->command_line_options();
my $src_dir = $argv->[0];
my $dst_dir = $argv->[1];
+ print STDERR "htmlify\t$src_dir =>\n\t\t$dst_dir\n";
+
+ # prepend $opt_I as @INC
+ if (defined $options->{ I }) {
+ print STDERR "\t\tprepend $options->{ I } (\@INC)\n" if $ENV{'debug'};
+ unshift(@INC, $options->{ I });
+ }
+
unless (-d $src_dir) {
croak("no such source directory");
}
@@ -93,10 +102,13 @@ sub run
mkdirhier($dst_dir, 0755);
}
- print STDERR "htmlify\t$src_dir =>\n\t\t$dst_dir\n";
-
- use Mail::HTML::Lite;
- &Mail::HTML::Lite::htmlify_dir($src_dir, { directory => $dst_dir });
+ eval q{
+ use Mail::HTML::Lite;
+ &Mail::HTML::Lite::htmlify_dir($src_dir, {
+ directory => $dst_dir,
+ });
+ };
+ croak($@) if $@;
}
else {
croak("no destination directory\n");
@@ -111,7 +123,11 @@ sub help
print <<"_EOF_";
-Usage: $name src_dir dst_dir
+Usage: $name [-I dir] src_dir dst_dir
+
+options:
+
+-I dir prepend dir into include path
_EOF_
}