various: add read-only mode support
[girocco/readme.git] / toolbox / make-all-gc-eligible.sh
blobeb7ca8f524302edd4dd143b40bca460fb024887b
1 #!/bin/sh
3 # Remove the entire girocco.gcsig section in all projects so that the
4 # next time 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 --remove-section girocco.gcsig 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'