diff --git a/src/hooks/update b/hooks/common/update similarity index 100% rename from src/hooks/update rename to hooks/common/update diff --git a/src/ga-post-update-hook b/hooks/gitolite-admin/post-update similarity index 100% rename from src/ga-post-update-hook rename to hooks/gitolite-admin/post-update diff --git a/src/gl-auth-command b/src/gl-auth-command index d1a7a84..c18d880 100755 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@ -176,7 +176,7 @@ if ( -d "$repo_base_abs/$repo.git" ) { # auto-vivify new repo if you have C access (and wildrepos is on) if ( $GL_WILDREPOS and $repos{$repo}{C}{$user} || $repos{$repo}{C}{'@all'} ) { wrap_chdir("$repo_base_abs"); - new_repo($repo, "$GL_ADMINDIR/src/hooks", $user); + new_repo($repo, "$GL_ADMINDIR/hooks/common", $user); wrap_chdir($ENV{HOME}); } } diff --git a/src/gl-compile-conf b/src/gl-compile-conf index 42c0143..e7fcb9c 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -396,7 +396,7 @@ for my $repo (sort keys %repos) { next if $repo =~ m(^EXTCMD/); # these are not real repos unless (-d "$repo.git") { print STDERR "creating $repo...\n"; - new_repo($repo, "$GL_ADMINDIR/src/hooks"); + new_repo($repo, "$GL_ADMINDIR/hooks/common"); # new_repo would have chdir'd us away; come back wrap_chdir("$repo_base_abs"); } diff --git a/src/gl-easy-install b/src/gl-easy-install index 35c31e2..a8dc013 100755 --- a/src/gl-easy-install +++ b/src/gl-easy-install @@ -169,12 +169,12 @@ basic_sanity() { # MANUAL: make sure you're in the gitolite directory, at the top level. # The following files should all be visible: - ls src/ga-post-update-hook \ + ls hooks/gitolite-admin/post-update \ + hooks/common/update \ src/gitolite.pm \ src/gl-install \ src/gl-auth-command \ src/gl-compile-conf \ - src/hooks/update \ conf/example.conf \ conf/example.gitolite.rc >/dev/null || die "cant find at least some files in gitolite sources/config; aborting" @@ -282,7 +282,7 @@ copy_gl() { # have to create the directory first. ssh -p $port $user@$host mkdir -p gitolite-install - scp $quiet -P $port -r src conf doc $user@$host:gitolite-install/ + scp $quiet -P $port -r src conf doc hooks $user@$host:gitolite-install/ rm -f src/VERSION # MANUAL: now log on to the server (ssh git@server) and get a command diff --git a/src/gl-install b/src/gl-install index 8a59569..dbebe22 100755 --- a/src/gl-install +++ b/src/gl-install @@ -48,12 +48,12 @@ my $repo_base_abs = ( $REPO_BASE =~ m(^/) ? $REPO_BASE : "$ENV{HOME}/$REPO_BASE" wrap_mkdir($repo_base_abs); wrap_mkdir($GL_ADMINDIR); # mkdir $GL_ADMINDIR's subdirs -for my $dir qw(conf doc keydir logs src) { +for my $dir qw(conf doc keydir logs src hooks hooks/common hooks/gitolite-admin) { wrap_mkdir("$GL_ADMINDIR/$dir"); } # "src" and "doc" will be overwritten on each install, but not conf -system("cp -R src doc $GL_ADMINDIR"); +system("cp -R src doc hooks $GL_ADMINDIR"); unless (-f $GL_CONF) { print <