summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-29 19:08:45 -0400
committerAndrew Cady <d@jerkface.net>2019-07-29 19:09:03 -0400
commit2e2c4440cbdf967764aae22888df026bb1fc6a74 (patch)
tree7ff345fc19d5e8788fb275bdea43c174f676329a /hooks/post-receive
parentb97c9e45ff37ee6d6135a525a3c784136adcf188 (diff)
checkout and run make
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