git.git: pick up latest gitweb updates
[girocco.git] / toolbox / make-all-gc-eligible.sh
blobd39283327c57a67197aa0185e9cdd02d6f23a45a
1 #!/bin/sh
3 # Unset gitweb.lastreceive in all projects so that the next time
4 # each project reaches its gc interval it will run gc
6 set -e
8 . @basedir@/shlib.sh
10 umask 002
12 base="$cfg_reporoot"
13 cut -d : -f 1 < "$cfg_chroot/etc/group" | grep -v ^_repo | \
15 count=0
16 while read proj; do
17 projdir="$base/$proj.git"
18 if git --git-dir="$projdir" config --unset gitweb.lastreceive 2>/dev/null; then
19 count=$(( $count + 1 ))
20 if [ $(( $count % 10 )) = 0 ]; then
21 printf '%s ' $count
24 done
25 if [ $(( $count % 10 )) != 0 ]; then
26 printf '%s ' $count
28 printf '%s\n' 'done'