cgi/editproj.cgi: Fix submit check
[girocco.git] / mirroring / update.sh
blob21346aafeb87671bbf16151bcf1ac30a4683ec3c
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
22 *) bang git mirror "$url";;
23 esac
25 bang git update-server-info
26 date -R >.last_refresh
28 if [ -e .banged ]; then
29 echo "$proj update succeeded - failure recovery" | mail -s "[$cfg_name] $proj update succeeded" "$mail,$cfg_admin"
30 rm .banged