From 2d0bde4cbc2bc5934b2d7e53f08c94ec74a43f03 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 20 Jan 2009 16:14:12 -0500 Subject: Correctly checkout GIT --- etc/phpshellsessions/cvssync | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'etc/phpshellsessions') diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index f5c8a40..ff1e6e2 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -97,15 +97,17 @@ echo "===> Checking out $branch\n"; exec("mkdir -p /root/pfsense/$branch"); // Git 'er done! -if(is_dir("$CODIR/master/mainline")) - exec("cd $CODIR/master/mainline && git fetch"); -else +if(is_dir("$CODIR/master/mainline")) { + exec("cd $CODIR/master/mainline && git pull"); +} else { exec("cd $CODIR && git clone $GIT_REPO"); + exec("cd $CODIR/master/mainline && git pull && checkout -b $BRANCHTAG origin/$BRANCHTAG"); +} if($branch == "master") exec("cd $CODIR/master/mainline && git pull && git checkout master"); else - exec("cd $CODIR/master/mainline && git pull && checkout -b $BRANCHTAG origin/$BRANCHTAG"); + exec("cd $CODIR/master/mainline && git pull && checkout $BRANCHTAG"); exec("mkdir -p /tmp/lighttpd/cache/compress/"); -- cgit v1.1