Fix name passing
[girocco/ztw.git] / updatecheck.sh
blob2766eb097b56c717a7330b9c1c9df3563281b187
1 #!/bin/bash
3 export PATH=/home/pasky/bin:$PATH
5 if [ -e /tmp/gitupdatelock ]; then
6 echo "Locked!" >&2
7 exit 1
8 fi
9 touch /tmp/gitupdatelock
11 cd /srv/git
12 find . -name base_url | cut -c 3- | sed -e 's/\/base_url$//' |
13 while read dir; do
14 if [ -e "$dir"/.nofetch ]; then
15 (cd "$dir/objects" && [ "$(ls ?? 2>/dev/null)" ] && GIT_DIR=".." git repack -a -l -d -q)
16 GIT_DIR="$dir" git update-server-info
17 else
18 /home/repo/repomgr/update.sh "${dir%.git}"
20 done 2>&1 | grep -v '^Pack.*created\.$'
22 rm /tmp/gitupdatelock