diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index f5c8a40aa4..ff1e6e29db 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/");