dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
881b36f
)
Support setting values for long options like --color=yes
author
Brion Vibber
<brion@users.mediawiki.org>
Mon, 18 Oct 2004 08:10:22 +0000
(08:10 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Mon, 18 Oct 2004 08:10:22 +0000
(08:10 +0000)
maintenance/commandLine.inc
patch
|
blob
|
history
diff --git
a/maintenance/commandLine.inc
b/maintenance/commandLine.inc
index
fb5a8d8
..
463366e
100644
(file)
--- a/
maintenance/commandLine.inc
+++ b/
maintenance/commandLine.inc
@@
-41,7
+41,14
@@
for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) {
}
$options[$option] = $param;
} else {
- $options[$option] = 1;
+ $bits = explode( '=', $option, 2 );
+ if( count( $bits ) > 1 ) {
+ $option = $bits[0];
+ $param = $bits[1];
+ } else {
+ $param = 1;
+ }
+ $options[$option] = $param;
}
} elseif ( $arg{0} == '-' ) {
# Short options