daemons/repod.sh: Introduce, invokes update.sh and gc.sh in infinite loop
[girocco.git] / mirroring / update.sh
blob5cba7a79d2cc7b9f1d6fa62594f644c6118b30de
1 #!/bin/bash
3 . @basedir@/shlib.sh
5 set -e
7 proj="$1"
9 bang_setup
10 bang_once=1
11 bang_action="update"
13 cd "$proj.git"
14 url="$(cat base_url)"
15 mail="$(cat owner)"
17 case "$url" in
18 svn://*)
19 GIT_DIR=. bang git svn fetch
20 GIT_DIR=. bang git fetch
23 bang git remote update
24 bang git remote prune origin
26 esac
28 bang git update-server-info
29 date -R >.last_refresh
31 if [ -e .banged ]; then
32 echo "$proj update succeeded - failure recovery" | mail -s "[$cfg_name] $proj update succeeded" "$mail,$cfg_admin"
33 rm .banged