diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-01-20 16:59:38 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-01-20 16:59:38 -0500 |
commit | 6b1437ca75e5fbb3d28f6121ae4153471b91fd86 (patch) | |
tree | 79892efd00b11959d2082937d65a111f0ad36546 /etc/phpshellsessions | |
parent | f6b84e5b9a761599a413084be1f419e1c52b83b3 (diff) | |
download | pfsense-6b1437ca75e5fbb3d28f6121ae4153471b91fd86.zip pfsense-6b1437ca75e5fbb3d28f6121ae4153471b91fd86.tar.gz |
Correctly checkout branches
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r-- | etc/phpshellsessions/cvssync | 13 |
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/"); |