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 LOCK=/var/run/all-modules.pid
16 function do_update() {
18 if [ -f $build_dir/auto-update.sh ] ; then
19 $build_dir/auto-update.sh
21 pushd $build_dir; svn update > .update.log 2>&1 ; popd
25 # usage: do_version dir name
26 function do_version () {
31 out_file=$out_dir/version.txt
32 out_tmp=$out_dir/.version.txt
38 $build_dir/module-version -a --url ; \
40 mv -f $out_tmp $out_file
43 # usage: do_version dir name
49 out_file=$out_dir/diff.txt
50 out_tmp=$out_dir/.diff.txt
56 $build_dir/module-diff -a -o ; \
59 ( echo 'WARNINGS (if any)' ; \
60 egrep 'was not found|Skipping failed' $out_tmp ;
61 cat $out_tmp ) > $out_file
67 echo "Usage: $COMMAND [-v] [-f] [-i]"
72 while [[ -n "$@" ]] ; do
75 -i) ls -l $LOCK ; exit 0 ;;
82 [ -f $LOCK ] && exit 1
86 do_update /root/svn-build-4.2
87 do_diff /root/svn-build-4.2 4.2
88 do_version /root/svn-build-4.2 4.2
89 do_update /root/svn-build
90 do_diff /root/svn-build trunk
91 do_version /root/svn-build trunk