Correctly checkout GIT

This commit is contained in:
Scott Ullrich 2009-01-20 16:14:12 -05:00
parent aa89be9d56
commit 2d0bde4cbc

View File

@ -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/");