summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-02-26 05:07:57 +0000
committerfukachan <fukachan>2004-02-26 05:07:57 +0000
commit490fa80c97e2ff6c28676ee1bfe42230af0b6c8a (patch)
tree3123166223eef1ad5c812bed4bc52e8016e74bcc
parent9cbc1a9eb6900b5e980013b63dfeb51a3a7db5fa (diff)
downloadfml8-490fa80c97e2ff6c28676ee1bfe42230af0b6c8a.tar.gz
fml8-490fa80c97e2ff6c28676ee1bfe42230af0b6c8a.tar.bz2
fml8-490fa80c97e2ff6c28676ee1bfe42230af0b6c8a.zip
new option -o key=value which overrider configurations.
you can use duplicated -o options e.g. -o key1=value1 -o key2=value2.
-rw-r--r--fml/etc/command_line_options40
-rw-r--r--fml/lib/FML/Process/Kernel.pm9
2 files changed, 28 insertions, 21 deletions
diff --git a/fml/etc/command_line_options b/fml/etc/command_line_options
index 0fdeca2d..e63aafd3 100644
--- a/fml/etc/command_line_options
+++ b/fml/etc/command_line_options
@@ -1,5 +1,5 @@
#
-# $FML: command_line_options,v 1.8 2003/11/29 11:08:03 fukachan Exp $
+# $FML: command_line_options,v 1.9 2003/12/24 12:49:10 fukachan Exp $
#
# map between programs and options
#
@@ -9,24 +9,24 @@
#
# libexec/
-command debug! help! params=s -c=s
-digest debug! help! params=s -c=s
-distribute debug! help! params=s -c=s
-error debug! help! params=s -c=s
-mead debug! help! params=s -c=s
-faker debug! help! params=s -c=s
+command debug! help! params=s -c=s -o=s%
+digest debug! help! params=s -c=s -o=s%
+distribute debug! help! params=s -c=s -o=s%
+error debug! help! params=s -c=s -o=s%
+mead debug! help! params=s -c=s -o=s%
+faker debug! help! params=s -c=s -o=s%
# bin/
-fml debug! help! force! log-dup! log-computer-output! quiet! q! params=s -c=s
-fmladdr debug! help! n! -c=s
-fmlalias debug! help! n! -c=s
-fmlconf debug! help! n! -c=s params=s
-fmldoc debug! help! -c=s params=s v! t! u! m! l!
-fmlerror debug! help!
-fmlhtmlify debug! help! -I=s
-fmlspool debug! help! -I=s convert! style=s srcdir=s
-fmlthread debug! help! article_id_max=i spool_dir=s base_url=s msg_base_url=s reverse! params=s -f=s -c=s
-makefml debug! help! force! log-dup! log-computer-output! quiet! q! params=s -c=s
+fml debug! help! force! log-dup! log-computer-output! quiet! q! params=s -c=s -o=s%
+fmladdr debug! help! n! -c=s -o=s%
+fmlalias debug! help! n! -c=s -o=s%
+fmlconf debug! help! n! -c=s params=s -o=s%
+fmldoc debug! help! -c=s params=s v! t! u! m! l! -o=s%
+fmlerror debug! help! -o=s%
+fmlhtmlify debug! help! -I=s -o=s%
+fmlspool debug! help! -I=s convert! style=s srcdir=s -o=s%
+fmlthread debug! help! article_id_max=i spool_dir=s base_url=s msg_base_url=s reverse! params=s -f=s -c=s -o=s%
+makefml debug! help! force! log-dup! log-computer-output! quiet! q! params=s -c=s -o=s%
# cgi-bin/
config.cgi
@@ -36,11 +36,11 @@ threadview.cgi
menu.cgi
# demo
-fmlsch debug! help! -D=s -F=s -m=s a! h!
+fmlsch debug! help! -D=s -F=s -m=s a! h! -o=s%
fmlsch.cgi
# compatibility
-fml.pl ctladdr! debug! help! params=s -c=s
+fml.pl ctladdr! debug! help! params=s -c=s -o=s%
# test
-loader ctladdr! debug! help! params=s -c=s
+loader ctladdr! debug! help! params=s -c=s -o=s%
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index c37da213..b144ad7e 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.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: Kernel.pm,v 1.206 2004/01/14 13:39:58 fukachan Exp $
+# $FML: Kernel.pm,v 1.207 2004/02/15 09:34:41 fukachan Exp $
#
package FML::Process::Kernel;
@@ -123,6 +123,13 @@ sub new
sprintf("fml-devel %s", $args->{ fml_version });
}
+ # 1.4 overwrite variables by -o options
+ if (defined $args->{ options }->{ o }) {
+ my ($k, $v);
+ my $opts = $args->{ options }->{ o };
+ while (($k, $v) = each %$opts) { $cfargs->{ $k } = $v;}
+ }
+
# 2.1 speculate $fml_owner_home_dir by the current process uid
# XXX we should compare $fml_owner and $< ?
{