}
$branches = array_keys($branches);
foreach ($branches as $b) {
+ $git = $branchesDir . $b;
+ $local = $localDir . $b;
echo '<b>' . $b . '</b>' . "\n";
if (!file_exists($branchesDir . $b)) {
$git = new CubeIT_CommandLine_Git($branchesDir);
echo $git->executeCmd('clone -b ' . $b . ' --single-branch git@git.cubedesigners.com:fluidbook-html5.git ' . $b);
}
- if (!file_exists($localDir . $b)) {
- mkdir($localDir . $b, 0777, true);
+ if (!file_exists($local)) {
+ mkdir($local, 0777, true);
+ `cp -r $git/* $local`;
+ `rm -rf $local/.git`;
}
$git = new CubeIT_CommandLine_Git($branchesDir . $b);
echo $git->executeCmd('reset --hard origin/' . $b);