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