summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-xhooks/post-receive11
1 files changed, 11 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
index 72dc81d..7f66079 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -15,5 +15,16 @@ warn()
15 fi 15 fi
16} 16}
17 17
18die()
19{
20 printf '%s: Error: %s\n' "$0" "$*" >&2
21 exit 1
22}
23
18GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\* 24GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\*
19 25
26export GIT_WORK_TREE=${GIT_DIR%.git}
27
28git checkout -f master || die 'command failed: git checkout'
29cd "$GIT_WORK_TREE" || die 'command failed: cd $GIT_WORK_TREE'
30make