serverside install/ga-hook: solaris compat

This commit is contained in:
Sitaram Chamarty 2009-11-19 17:38:40 +05:30
parent 23be2b6240
commit d332b1537d
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
# get this from your .gitolite.conf; and don't forget this is shell, while
# that is perl :-)
export GL_ADMINDIR=$HOME/.gitolite
export GL_ADMINDIR; GL_ADMINDIR=$HOME/.gitolite
# checkout the master branch to $GL_ADMINDIR
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
@ -13,7 +13,7 @@ GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
rm -rf $GL_ADMINDIR/conf/fragments
# collect all the delegated fragments
mkdir $GL_ADMINDIR/conf/fragments
for br in $(git for-each-ref --format='%(refname:short)')
for br in `git for-each-ref --format='%(refname:short)'`
do
# skip master (duh!)
[ "$br" = "master" ] && continue

View file

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