summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hooks/post-receive19
1 files changed, 19 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
new file mode 100644
index 0000000..d759dcb
--- /dev/null
+++ b/hooks/post-receive
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+source ~/git-shell-variables.sh
+source ~/bin/libgithook.sh
+
+load_file_actions
+dump_sess
+
+cache="$(deploy_cache ${NEWREV})"
+
+for i in ${FILES_M[@]} ${FILES_A[@]}; do
+ f="$(basename ${i})"
+ d="$(dirname ${i})"
+
+ # Deploy git hook updates
+ if [ "${d}" = 'hooks' ]; then
+ cp -v "${cache}/${i}" "${src}/hooks/"
+ fi
+done

Generated by cgit