Cloning design overhaul - daemon instead of cronjobs
[girocco/mytab.git] / mirroring / update.sh
blobed683d8d1b025c83b6ab2495e048b842dc593d08
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 bang git mirror "$url"
18 bang git update-server-info
19 date -R >.last_refresh
21 if [ -e .banged ]; then
22 echo "$proj update succeeded - failure recovery" | mail -s "[$cfg_name] $proj update succeeded" "$mail,$cfg_admin"
23 rm .banged