add hook, the last piece

This commit is contained in:
Sitaram Chamarty 2009-08-23 21:40:03 +05:30 committed by Sitaram Chamarty
parent 4a4b6e9d97
commit 2e38867b59
2 changed files with 85 additions and 0 deletions

View file

@ -225,6 +225,7 @@ close(OUT);
# did not have that luxury, so it was forced to detect the first push and
# create it then
umask(0077);
my_chdir("$ENV{HOME}/$REPO_BASE");
for my $repo (keys %repos)
{
@ -233,6 +234,8 @@ for my $repo (keys %repos)
mkdir("$repo.git") or die "mkdir $repo.git failed: $!";
my_chdir("$repo.git");
system("git init --bare");
system("cp $GL_ADMINDIR/update-hook.pl hooks/update");
system("chmod 755 hooks/update");
my_chdir("$ENV{HOME}/$REPO_BASE");
}
}