diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-24 04:35:07 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-24 04:35:07 +0000 |
commit | f8757b62fdda91c9f60fb3e6f093b413513a2785 (patch) | |
tree | 3fc8729cc91c11b6a08078e961b62057b8701542 /etc/phpshellsessions | |
parent | dc2d40b2e17e8613e9ef80022853572da2260e61 (diff) | |
download | pfsense-f8757b62fdda91c9f60fb3e6f093b413513a2785.zip pfsense-f8757b62fdda91c9f60fb3e6f093b413513a2785.tar.gz |
Allow command arguments from pfSsh.php
Diffstat (limited to 'etc/phpshellsessions')
-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 692207d..8ced644 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"; |