Skip to content

Commit

Permalink
install: can't assume p-t-a is setup!
Browse files Browse the repository at this point in the history
make installing the p-u hook conditional to avoid ugly error
  • Loading branch information
Sitaram Chamarty committed Oct 11, 2009
1 parent af7fd0b commit 9d2c966
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/install.pl
Expand Up @@ -66,7 +66,10 @@ sub wrap_mkdir
}

# oh and one of those repos is a bit more special and has an extra hook :)
system("cp $GL_ADMINDIR/src/pta-hook.sh gitolite-admin.git/hooks/post-update");
system("perl", "-i", "-p", "-e", "s(export GL_ADMINDIR=.*)(export GL_ADMINDIR=$GL_ADMINDIR)",
"gitolite-admin.git/hooks/post-update");
chmod 0755, "gitolite-admin.git/hooks/post-update";
if ( -d "gitolite-admin.git/hooks" ) {
print STDERR "copying post-update hook to gitolite-admin repo...\n";
system("cp -v $GL_ADMINDIR/src/pta-hook.sh gitolite-admin.git/hooks/post-update");
system("perl", "-i", "-p", "-e", "s(export GL_ADMINDIR=.*)(export GL_ADMINDIR=$GL_ADMINDIR)",
"gitolite-admin.git/hooks/post-update");
chmod 0755, "gitolite-admin.git/hooks/post-update";
}

0 comments on commit 9d2c966

Please sign in to comment.