"; echo "Give me a repo_url: \n"; echo curPageURL() . "?repo_url=http://gitbut/username/repository.git\n"; echo "
"; echo ""; echo "
"; echo ""; echo "
"; echo ""; } elseif(file_exists(".git")) { header("Content-Type: text/plain"); echo "Allready installed\n"; } else { header("Content-Type: text/plain"); echo "git clone $repo_url $dest\n"; echo `git clone $repo_url $dest 2>&1`; if (file_exists("index.html")) { echo "rm index.html\n"; unlink("index.html"); } echo "mv $dest/* $dest/.* $base/\n"; echo `mv $dest/* $dest/.* $base/`; echo "rmdir $dest\n"; echo `rmdir $dest`; echo "rm $filename\n"; echo `rm $filename`; $hooker = 'hooker-' . generateRandomString(41) . '.php'; echo "Use this URL in repository hook:\n"; echo 'http://' . $_SERVER["SERVER_NAME"] . '/' . $hooker; $content = '&1`;' . "\n"; $content .= '?>'; file_put_contents($hooker, $content); } ?>