Permalink
Browse files

p-t-a: make the post-update hook a separate file...

...and just refer to it in the doc.  This hook will acquire more code soon,
when we do delegations :)
  • Loading branch information...
1 parent 34a6f89 commit 5bb0850c5c628f279c8bd16fdd5583c89402093d Sitaram Chamarty committed Oct 2, 2009
Showing with 13 additions and 12 deletions.
  1. +7 −12 doc/4-push-to-admin.mkd
  2. +6 −0 src/pta-hook.sh
View
@@ -70,20 +70,15 @@ repos they play havoc with my git commands, so this is how I do it)
GIT_WORK_TREE=/home/git/.gitolite git add conf/gitolite.conf keydir
GIT_WORK_TREE=/home/git/.gitolite git commit -am start
-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 `~/.gitolite`), and (2) run the compile script. So we create a hook with
-the appropriate code in it, and then make it executable
+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
+`~/.gitolite`), and (2) run the compile script.
- cat <<EOFPU > hooks/post-update
- #!/bin/sh
-
- GIT_WORK_TREE=/home/git/.gitolite git checkout -f
-
- cd /home/git/.gitolite
- src/gl-compile-conf
- EOFPU
+`src/pta-hook.sh` has the code you need; just copy it to the right place with
+the right name and make sure it is executable:
+ # (assuming pwd is still ~/repositories/gitolite-admin.git)
+ cp ~/.gitolite/src/pta-hook.sh hooks/post-update
chmod +x hooks/post-update
----
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+GIT_WORK_TREE=/home/git/.gitolite git checkout -f
+
+cd /home/git/.gitolite
+src/gl-compile-conf

0 comments on commit 5bb0850

Please sign in to comment.