blob: 066a4b122575fce4e19730f357c1ce71b8d63950 (
plain)
1 #!/usr/bin/env bash
2
3 source ~/git-shell-variables.sh
4 source ~/bin/libgithook.sh
5
6 export LANG=en_US.utf8
7 export LC_ALL=en_US.utf8
8
9 load_file_actions
10 CACHE=$(use_cache ${NEWREV})
11 cd "${CACHE}"
12
13 for i in ${FILES_A[@]} ${FILES_M[@]}; do
14 d="$(dirname ${i})"
15 f="$(basename ${i})"
16 if [ "$(basename ${d})" = 'hooks' ]; then
17 printf 'Deploying hook updates\n'
18 cp -v "${i}" "${SRC}/hooks/"
19 elif [ "${f%.*}" = 'resume' ]; then
20 printf 'Generating and deploying resume\n'
21 make embed
22 install -v -D out/resume.html "${WEB}/oper.io.git/master/resume.html"
23 fi
24 done
25
26 cd "${SRC}"
27 if [ "${SRC}" != "${CACHE}" ]; then
28 printf 'Cleaning up cache\n'
29 rm -rf "${CACHE}"
30 fi
|