can_user_push.c: simplify code
[girocco.git] / toolbox / updatecheck.sh
blob97cde6a75ddbb02a3b442399ae9579e9c7473806
1 #!/bin/bash
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