3 # this script is a wrapper around the module-tools (version and diff)
4 # it is invoked every 30 minutes on onelab build box
5 # prior to that, the following directories will have been svn updated :
9 # avoid running several instances of this script
10 # when the svn server has problems, this can very well last quite a while
12 COMMAND=$(basename $0)
14 running=$(pgrep $COMMAND 2> /dev/null | grep -v "^${pid}"'^' )
15 # bail out if another instance is already running
16 [ -n "$running" ] && exit 1
20 # usage: do_version dir name
21 function do_version () {
26 out_file=$out_dir/version.txt
27 out_tmp=$out_dir/.version.txt
33 $build_dir/module-version -a ; \
35 mv -f $out_tmp $out_file
38 # usage: do_version dir name
44 out_file=$out_dir/diff.txt
45 out_tmp=$out_dir/.diff.txt
51 $build_dir/module-diff -a -o -q ; \
54 ( echo 'WARNINGS (if any)' ; \
55 egrep 'was not found|Skipping failed' $out_tmp ;
56 cat $out_tmp ) > $out_file
61 do_version /root/svn-build-4.2 4.2
62 do_diff /root/svn-build-4.2 4.2
63 do_version /root/svn-build trunk
64 do_diff /root/svn-build trunk