13 # This removes any remnants from "$cfg_reporoot"/$proj.git _and_ gets rid
14 # of the group record.
15 perl
-I@basedir@
-MGirocco::Project
-e 'Girocco::Project->ghost('"'$proj'"')->delete;'
16 cd "$queuedir" && rm -rf "$proj"/* "$proj"/.banged
&& rmdir -p "$proj"
23 # First, the boring clone itself
25 if [ -s objects
/info
/alternates
]; then
26 ref
=(--reference "$(cat objects/info/alternates | sed 's#/objects$##')")
28 bang git clone
"${ref[@]}" --bare "$url" repodir
30 # Double-check that we aren't going to overwrite anything existing
31 ! [ -d "$cfg_reporoot/$proj.git" ]
33 # Set up fork container if necessary
34 lproj
="$(echo "$proj" | sed 's/^\(.*\/\)\(.*\)/\1/')"
35 if [ z
"$lproj" != z
"$proj" ]; then
36 bang mkdir
-m 0775 -p "$cfg_reporoot/$lproj"
39 # Move us into our new home
40 bang
mv repodir
"$cfg_reporoot/$proj.git"
41 bang
mv base_url owner description homepage README.html
"$cfg_reporoot/$proj.git/"
44 bang git
--git-dir="$cfg_reporoot/$proj.git" config
--bool --add mirror.allowed true
45 bang git
--git-dir="$cfg_reporoot/$proj.git" update-server-info
48 cd "$queuedir" && rm -rf "$proj"/* "$proj"/.banged
&& rmdir -p "$proj"
49 # NO bang BELOW THIS POINT! rm -r depends on cwd.
51 mail -s "[$cfg_name] $proj clone completed" "$mail,$cfg_admin" <<EOT
52 Congratulations! The clone of project $proj just completed.
54 * GitWeb interface: $cfg_gitweburl/$proj.git
55 * Project settings: $cfg_webadmurl/editproj.cgi?name=$proj