From 932364e7729cf979382173b3a8079fc1bf53f09c Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 29 Apr 2010 03:57:36 -0600 Subject: Default to and display the last used repository URL in gitsync. --- etc/phpshellsessions/gitsync | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc/phpshellsessions/gitsync') 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"; -- cgit v1.1