html/about.html: Allow 400M instead of 100M
[girocco.git] / mirroring / clone.sh
blobf2371750e7526391a1b59494534e59c51073b265
1 #!/bin/bash
3 # Invoked from mirroring/cloned.pl
5 . @basedir@/shlib.sh
7 set -e
9 projdir="$1"
10 proj="${projdir%.git}"
12 cd "$cfg_reporoot/$projdir"
13 trap "echo '@OVER@'; touch .clone_failed" EXIT
14 url="$(cat base_url)"
15 mail="$(cat owner)"
17 # Configure
18 echo "Configuring repository..."
19 git config --bool mirror.allowed true
21 # Initial mirror
22 echo "Initiating mirroring..."
23 git mirror "$url"
25 # The rest
26 echo "Final touches..."
27 git update-server-info
28 trap "" EXIT
29 mail -s "[$cfg_name] $proj clone completed" "$mail,$cfg_admin" <<EOT
30 Congratulations! The clone of project $proj just completed.
32 * Source URL: $url
33 * GitWeb interface: $cfg_gitweburl/$projdir
34 * Project settings: $cfg_webadmurl/editproj.cgi?name=$proj
36 Have a lot of fun.
37 EOT
39 echo "Mirroring finished successfuly!"
40 rm .clone_in_progress
41 echo "@OVER@"