summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-24 04:35:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-24 04:35:32 +0000
commit71845120007b42ec42cae0ed7dacc44c31e58a0d (patch)
treec4287a0b04dadf166d10774554946953917a33d9 /etc
parent44d2484c33b4650ad3e36658e851fd2f0579fa9c (diff)
downloadpfsense-71845120007b42ec42cae0ed7dacc44c31e58a0d.zip
pfsense-71845120007b42ec42cae0ed7dacc44c31e58a0d.tar.gz
Allow command arguments from pfSsh.php
Diffstat (limited to 'etc')
-rw-r--r--etc/phpshellsessions/cvssync23
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";
OpenPOWER on IntegriCloud