From: Brion Vibber Date: Sat, 4 Sep 2004 08:54:59 +0000 (+0000) Subject: More command-line options so I can just hit 'up, enter' instead of the tedious prompt. :) X-Git-Tag: 1.5.0alpha1~2113 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=10aae0b510700cd2a735aee18445d6788b3018f1;p=lhc%2Fweb%2Fwiklou.git More command-line options so I can just hit 'up, enter' instead of the tedious prompt. :) --- diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 73cd923017..b5c788c422 100755 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -85,10 +85,24 @@ function readaline( $prompt = '') { # Main ! # -if( is_array( $argv ) && isset( $argv[1] ) && $argv[1] == '--all' ) { - # Quick option - $input = 0; -} else { +unset( $file ); + +if( is_array( $argv ) && isset( $argv[1] ) ) { + switch( $argv[1] ) { + case '--all': $input = 0; break; + case '--includes': $input = 1; break; + case '--maintenance': $input = 2; break; + case '--skins': $input = 2; break; + case '--file': + $input = 4; + if( isset( $argv[2] ) ) { + $file = $argv[2]; + } + break; + } +} + +if( $input === '' ) { print <<