X-Git-Url: http://git.pjr.cc/?p=gwvp-mini.git;a=blobdiff_plain;f=bin%2Fgwvpminicmdtool.php;fp=bin%2Fgwvpminicmdtool.php;h=9781a8ec9e38807e05bb43901f6c0d1a76ba5903;hp=e4f6fe1af3192f4a3ffb9df291534e4bd5ba3e35;hb=485cfe9bf50839aef6cd00b766ecda8b82fb3fa3;hpb=2a38e8940504a2c9d9e0f813c3f8f225d99c4c4a diff --git a/bin/gwvpminicmdtool.php b/bin/gwvpminicmdtool.php index e4f6fe1..9781a8e 100644 --- a/bin/gwvpminicmdtool.php +++ b/bin/gwvpminicmdtool.php @@ -74,6 +74,20 @@ function gwvpcmdtool_Usage() function gwvpcmdtool_BackGroundClone() { // here we parse arguments and have stuff with things and its 6am why am i doing this right now? + global $data_directory, $argv; + + $repo_base = gwvpmini_getConfigVal("repodir"); + + $from = $argv[1]; + $to = $argv[2]; + echo "Would actually clone $from to $to in $data_directory\n"; + //sleep(20); + + $cmd = "git clone --bare $from $repo_base/$to.git"; + exec($cmd); + $rid = gwvpmini_GetRepoId($to); + gwvpmini_EnableRepo($rid); + echo "update $to ($rid) and enabled it\n"; } // update will log things like branch and tag creations