Debian Codegraph @

tools/watch_cvs

raw
1 #!/bin/sh
2 # Watch the CVS repository for changes in memchan, retrieve the
3 # changed files and invoke the handler script which propagate the
4 # changes to other parts of the system.
5
6 cd `dirname $0`/..
7
8 CVSROOT
9 CVSROOT=:pserver:anonymous@cvs1:/cvsroot/memchan
10
11 if [ 0 -lt `cvs -d $CVSROOT diff memchan 2>/dev/null | wc -l` ]
12 then
13 out=$HOME/logs/memchan
14 mkdir -p `dirname $out`
15
16 cvs -d $CVSROOT co memchan >$out 2>&1
17 mkdir -p memchan/htdocs/state
18
19 # Use a new htdocs_setup script immediately.
20 # Without this copying it would take effect
21 # only after with the change after the current
22 # one.
23
24 cp ./memchan/tools/htdocs_setup ./tools/htdocs_setup
25
26 (sleep 60 ; ./tools/htdocs_setup ) &
27 fi
28 exit