diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-24 04:35:32 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-24 04:35:32 +0000 |
commit | 71845120007b42ec42cae0ed7dacc44c31e58a0d (patch) | |
tree | c4287a0b04dadf166d10774554946953917a33d9 /etc | |
parent | 44d2484c33b4650ad3e36658e851fd2f0579fa9c (diff) | |
download | pfsense-71845120007b42ec42cae0ed7dacc44c31e58a0d.zip pfsense-71845120007b42ec42cae0ed7dacc44c31e58a0d.tar.gz |
Allow command arguments from pfSsh.php
Diffstat (limited to 'etc')
-rw-r--r-- | etc/phpshellsessions/cvssync | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index a44e784..9cea3fe 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -38,23 +38,26 @@ if(!file_exists("/usr/bin/cvs")) { } global $argv; +global $command_split; /* NOTE: Set branches here */ $branches = array("HEAD" => "Main development branch", "RELENG_1" => "1.2 Release branch", "RELENG_1_2" => "1.3 development branch"); - -if(!$argv[3]) { - echo "\nPlease select which branch you would like:\n\n"; - foreach($branches as $branchname => $branchdesc) { - echo "{$branchname} - {$branchdesc}\n"; - } - $branch = readline("\n> "); - echo "\n"; +if($command_split[3]) { + $branch = $command_split[3]; } else { - $branch = $argv[3]; + if(!$argv[3]) { + echo "\nPlease select which branch you would like:\n\n"; + foreach($branches as $branchname => $branchdesc) { + echo "{$branchname} - {$branchdesc}\n"; + } + $branch = readline("\n> "); + echo "\n"; + } else { + $branch = $argv[3]; + } } - create_supfile($branch); $CODIR = "/home/pfsense/$branch"; |