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