From 8eefc036e023aea86ded1a355ccf7272cf7d01ba Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 23 Oct 2009 10:23:06 +0530 Subject: [PATCH] rc, pta-hook/doc: don't assume $HOME of 'git' user is /home/git (Thanks to Jerome Arbez-Gindre) --- conf/example.gitolite.rc | 2 +- doc/4-push-to-admin.mkd | 4 ++-- src/pta-hook.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/example.gitolite.rc b/conf/example.gitolite.rc index b3b3361..16bab4d 100644 --- a/conf/example.gitolite.rc +++ b/conf/example.gitolite.rc @@ -27,7 +27,7 @@ $REPO_UMASK = 0077; # gets you 'rwx------' # part of the setup of gitweb is a variable called $projects_list (please see # gitweb documentation for more on this). Set this to the same value: -$PROJECTS_LIST = "/home/git/projects.list"; +$PROJECTS_LIST = $ENV{HOME} . "/projects.list"; # -------------------------------------- diff --git a/doc/4-push-to-admin.mkd b/doc/4-push-to-admin.mkd index 8791480..7e5fc77 100644 --- a/doc/4-push-to-admin.mkd +++ b/doc/4-push-to-admin.mkd @@ -74,8 +74,8 @@ make the same changes below. repos they play havoc with my git commands, so this is how I do it) cd ~/repositories/gitolite-admin.git - GIT_WORK_TREE=/home/git/.gitolite git add conf/gitolite.conf keydir - GIT_WORK_TREE=/home/git/.gitolite git commit -am start + GIT_WORK_TREE=$HOME/.gitolite git add conf/gitolite.conf keydir + GIT_WORK_TREE=$HOME/.gitolite git commit -am start 4. Now we have to setup the post-update hook for push-to-admin to work. The hook should (1) make a forced checkout in the "live" config directory (which is diff --git a/src/pta-hook.sh b/src/pta-hook.sh index 5009313..2613340 100755 --- a/src/pta-hook.sh +++ b/src/pta-hook.sh @@ -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/git/.gitolite +export GL_ADMINDIR=$HOME/.gitolite # checkout the master branch to $GL_ADMINDIR GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master