From 75b52e019be07c3530dd90236370b1670992d570 Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Sat, 28 Mar 2020 18:19:43 -0600 Subject: add hooks file --- hooks/post-receive | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hooks/post-receive 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 -- cgit v1.2.3