Support setting values for long options like --color=yes
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 18 Oct 2004 08:10:22 +0000 (08:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 18 Oct 2004 08:10:22 +0000 (08:10 +0000)
maintenance/commandLine.inc

index fb5a8d8..463366e 100644 (file)
@@ -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