Created
November 9, 2011 12:34
-
-
Save davidrenne/1351309 to your computer and use it in GitHub Desktop.
Dumb script that will download a repository to your server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (array_key_exists('user',$_REQUEST)) | |
{ | |
if (!is_dir($_REQUEST['repo'])) | |
{ | |
system("mkdir {$_REQUEST['repo']} && cd {$_REQUEST['repo']} && git init && git pull git://github.com/{$_REQUEST['user']}/{$_REQUEST['repo']}.git master"); | |
} | |
else | |
{ | |
die('directory '.$_REQUEST['repo'].' already exists'); | |
} | |
} | |
else | |
{ | |
echo <<<FORM | |
<form method="GET"> | |
Git Hub Dev :<input type="text" name="user" value="davidrenne"/> | |
<br/>Git Hub Repo:<input type="text" name="repo" value="cruddy_mysql"/> | |
<br/><input type="submit" value="git hub!"/> | |
</form> | |
FORM; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment