summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-01-20 17:00:41 -0500
committerScott Ullrich <sullrich@pfsense.org>2009-01-20 17:00:41 -0500
commit2f44018f371e271c2a518a55c4e2c90d8964881c (patch)
tree8070e4dd5ad3da94f82254dfbc2e86cb0c28af97 /etc
parent29d004b1604c49a3f7252e2f0c227d9c3da79cb6 (diff)
downloadpfsense-2f44018f371e271c2a518a55c4e2c90d8964881c.zip
pfsense-2f44018f371e271c2a518a55c4e2c90d8964881c.tar.gz
Correctly checkout branches
Diffstat (limited to 'etc')
-rw-r--r--etc/phpshellsessions/cvssync13
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync
index ca3dc24..f89ae3a 100644
--- a/etc/phpshellsessions/cvssync
+++ b/etc/phpshellsessions/cvssync
@@ -101,13 +101,18 @@ if(is_dir("$CODIR/mainline")) {
exec("cd $CODIR/mainline && git fetch");
} else {
exec("cd $CODIR && git clone $GIT_REPO");
- exec("cd $CODIR/mainline && git fetch && git checkout -b $BRANCHTAG origin/$BRANCHTAG");
+ exec("cd $CODIR/mainline && git fetch");
}
-if($branch == "master")
+if($branch == "master") {
exec("cd $CODIR/mainline && git checkout master");
-else
- exec("cd $CODIR/mainline && git checkout $BRANCHTAG");
+} else {
+ $current_branch=`git branch | grep $BRANCHTAG`
+ if($current_branch == "")
+ exec("cd $CODIR/mainline && git fetch && git checkout -b $BRANCHTAG origin/$BRANCHTAG");
+ else
+ exec("cd $CODIR/mainline && git checkout $BRANCHTAG");
+}
exec("mkdir -p /tmp/lighttpd/cache/compress/");
OpenPOWER on IntegriCloud