bitmaps: include a bitmap hash cache by default
[girocco.git] / jobs / updateweb.sh
blob0045f92a18b83c4118840433bc1dcaa9bb01db2c
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 case "$(git describe --always --dirty=..dirty)" in *..dirty)
23 echo "updateweb.sh: refusing to update because worktree is dirty" >&2
24 rm ${LOCK_FILE}
25 exit 1
26 esac
27 git merge --ff-only $REMOTE/$BRANCH && \
28 git submodule update --init --recursive && \
29 make -s && \
30 make install || :
33 rm ${LOCK_FILE}