tagproj: also touch htmlcache/changed on tag update
[girocco.git] / jobs / updateweb.sh
blob0c7db6242d9aa3bd696c797ae1463d937b97ba8d
1 #!/bin/sh
3 . @basedir@/shlib.sh
5 set -e
7 REPO_DIR=/home/repo/repo
8 LOCK_FILE=/tmp/updateweb-$cfg_tmpsuffix.lock
9 REMOTE=origin
10 BRANCH=rorcz
12 # Make sure we don't run twice.
13 if [ -s ${LOCK_FILE} ] && kill -0 $(cat ${LOCK_FILE}) 2>/dev/null; then
14 echo "Already running updateweb.sh (stuck?) with pid $(cat ${LOCK_FILE})" >&2
15 exit 1
17 echo $$ >${LOCK_FILE}
19 cd "${REPO_DIR}"
20 git fetch origin
21 if [ -n "$(git rev-list $BRANCH..$REMOTE/$BRANCH)" ]; then
22 git merge --ff-only $REMOTE/$BRANCH && \
23 git submodule update && \
24 make -s && \
25 make install
28 rm ${LOCK_FILE}