3 # Invoked from mirroring/cloned.pl
10 proj
="${projdir%.git}"
12 cd "$cfg_reporoot/$projdir"
13 trap "echo '@OVER@'; touch .clone_failed" EXIT
18 echo "Configuring repository..."
19 git config
--bool mirror.allowed true
22 echo "Initiating mirroring..."
25 GIT_DIR
=. git svn init
-s "$url"
26 GIT_DIR
=. git svn fetch
27 # Neat Trick suggested by Miklos Vajna
28 GIT_DIR
=. git config remote.origin.url .
29 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/heads
/*:refs
/heads
/*
30 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/trunk
:refs
/heads
/master
31 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/tags
/*:refs
/tags
/*
34 *) git mirror
"$url";;
38 echo "Final touches..."
39 git update-server-info
41 mail -s "[$cfg_name] $proj clone completed" "$mail,$cfg_admin" <<EOT
42 Congratulations! The clone of project $proj just completed.
45 * GitWeb interface: $cfg_gitweburl/$projdir
46 * Project settings: $cfg_webadmurl/editproj.cgi?name=$proj
51 echo "Mirroring finished successfuly!"