summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-04-29 03:57:36 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-04-29 04:00:46 -0600
commit932364e7729cf979382173b3a8079fc1bf53f09c (patch)
tree654c12009d5e3fc2fd8e9d5d36897d813de83746 /etc/phpshellsessions
parent7d35ed789061a755127ac4b2dde533c30e4bdee1 (diff)
downloadpfsense-932364e7729cf979382173b3a8079fc1bf53f09c.zip
pfsense-932364e7729cf979382173b3a8079fc1bf53f09c.tar.gz
Default to and display the last used repository URL in gitsync.
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r--etc/phpshellsessions/gitsync8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index e67452b..4176dfe 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -48,10 +48,18 @@ if(file_exists("/root/cvssync_backup.tgz")) {
$branches = array_merge($branches, $tmp);
}
+if(is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) {
+ exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url", $output_str, $ret);
+ if(is_array($output_str) && !empty($output_str[0]))
+ $GIT_REPO = $output_str[0];
+ unset($output_str);
+}
+
if($command_split[2]) {
$branch = $command_split[2];
} else {
if(!$argv[3]) {
+ echo "\nCurrent repository is $GIT_REPO\n";
echo "\nPlease select which branch you would like to sync against:\n\n";
foreach($branches as $branchname => $branchdesc) {
echo "{$branchname} \t {$branchdesc}\n";
OpenPOWER on IntegriCloud