Girocco/Config.pm: update for dev.repo.or.cz support
[girocco.git] / toolbox / updatecheck.sh
blob657794c82685b956627f8368318181fe89970f61
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 cut -d : -f 1 <"$cfg_chroot/etc/group" | grep -v "^_repo" |
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