mirroring: add individual foreign vcs mirror control
[girocco.git] / toolbox / updatecheck.sh
blobab4824a75a67a02ed7e29c04e871590bce01261a
1 #!/bin/sh
3 # Repack in reverse order, so that forked repositories get repacked first.
4 # That prevents objects from missing, since repack -l will automagically
5 # put the now-going-away objects into the forked repository's object store.
7 . @basedir@/shlib.sh
9 cd "$cfg_reporoot"
10 cat "$cfg_chroot/etc/group" | cut -d : -f 1 | \
11 while read dir; do
12 echo "* $dir" >&2
13 if [ -e "$dir.git"/.nofetch ]; then
14 # echo "+l `date` $dir"
15 # (cd "$dir.git/objects" && [ "$(ls ?? 2>/dev/null)" ] && GIT_DIR=".." git repack -A -d -q)
16 # GIT_DIR="$dir.git" git update-server-info
17 # echo "-l `date` $dir"
19 else
20 echo "+r `date` $dir"
21 "$cfg_basedir/jobd/update.sh" "${dir}"
22 echo "-r `date` $dir"
24 done 2>&1