diff options
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/post-receive | 11 |
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 | ||
18 | die() | ||
19 | { | ||
20 | printf '%s: Error: %s\n' "$0" "$*" >&2 | ||
21 | exit 1 | ||
22 | } | ||
23 | |||
18 | GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\* | 24 | GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\* |
19 | 25 | ||
26 | export GIT_WORK_TREE=${GIT_DIR%.git} | ||
27 | |||
28 | git checkout -f master || die 'command failed: git checkout' | ||
29 | cd "$GIT_WORK_TREE" || die 'command failed: cd $GIT_WORK_TREE' | ||
30 | make | ||