diff options
| author | fukachan <fukachan> | 2001-11-05 13:02:35 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-05 13:02:35 +0000 |
| commit | 376a70b80152784736d30aef5c18e3188024bf18 (patch) | |
| tree | c352fc044d3856c591367d2a53b3546e9d8e77bb | |
| parent | c76984fd0d7121b99d6c1b263231760686ac98d1 (diff) | |
| download | fml8-376a70b80152784736d30aef5c18e3188024bf18.tar.gz fml8-376a70b80152784736d30aef5c18e3188024bf18.tar.bz2 fml8-376a70b80152784736d30aef5c18e3188024bf18.zip | |
fmlhtmlify [-I dir]
| -rw-r--r-- | fml/lib/FML/Process/HTMLify.pm | 28 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Switch.pm | 4 |
2 files changed, 24 insertions, 8 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_ } diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm index 7a03006c..6299c33b 100644 --- a/fml/lib/FML/Process/Switch.pm +++ b/fml/lib/FML/Process/Switch.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Switch.pm,v 1.26 2001/11/04 13:42:05 fukachan Exp $ +# $FML: Switch.pm,v 1.27 2001/11/05 12:26:38 fukachan Exp $ # package FML::Process::Switch; @@ -364,7 +364,7 @@ sub _module_specific_options return qw(debug! -D=s -F=s -m=s a!); } elsif ($myname eq 'fmlhtmlify') { - return qw(debug!); + return qw(debug! -I=s); } else { croak "options for $myname are not defined.\n"; |
