From a4b5f9409c43b280c49b39c924ae8acdbe882b5a Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Fri, 27 Nov 2020 18:31:36 -0700 Subject: Update post-receive hook to use new encapsulation method --- hooks/post-receive | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/hooks/post-receive b/hooks/post-receive index 066a4b1..d977771 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -1,30 +1,14 @@ #!/usr/bin/env bash -source ~/git-shell-variables.sh -source ~/bin/libgithook.sh - export LANG=en_US.utf8 export LC_ALL=en_US.utf8 -load_file_actions -CACHE=$(use_cache ${NEWREV}) -cd "${CACHE}" - for i in ${FILES_A[@]} ${FILES_M[@]}; do d="$(dirname ${i})" f="$(basename ${i})" - if [ "$(basename ${d})" = 'hooks' ]; then - printf 'Deploying hook updates\n' - cp -v "${i}" "${SRC}/hooks/" - elif [ "${f%.*}" = 'resume' ]; then + if [ "${f%.*}" = 'resume' ]; then printf 'Generating and deploying resume\n' make embed install -v -D out/resume.html "${WEB}/oper.io.git/master/resume.html" fi done - -cd "${SRC}" -if [ "${SRC}" != "${CACHE}" ]; then - printf 'Cleaning up cache\n' - rm -rf "${CACHE}" -fi -- cgit v1.2.3