#!/bin/bash
# $Id$
# this script is a wrapper around the module-tools (version and diff)
-# it is invoked every 30 minutes on onelab build box
+# it is invoked cyclically
# prior to that, the following directories will have been svn updated :
-# /root/svn-build
-# /root/svn-build-4.2
+# ~/svn-build
+# ~/root/svn-build-4.2
# avoid running several instances of this script
# when the svn server has problems, this can very well last quite a while
COMMAND=$(basename $0)
-OUTPUT=/build/modules
-LOCK=/var/run/all-modules.pid
+
+# make the command usable as non-root user at Princeton for more efficiency
+if [ "$(id -u)" == "0" ] ; then
+ OUTPUT=/build/modules
+ LOCK=/var/run/all-modules.pid
+else
+ OUTPUT=~/all-modules
+ LOCK=~/all-modules/run.pid
+fi
function do_update() {
build_dir=$1; shift
echo $$ > $LOCK
- do_update /root/svn-build-4.3
- do_diff /root/svn-build-4.3 4.3
- do_version /root/svn-build-4.3 4.3
- do_update /root/svn-build
- do_diff /root/svn-build 5.0
- do_version /root/svn-build 5.0
+ do_update ~/svn-build-4.3
+ do_diff ~/svn-build-4.3 4.3
+ do_version ~/svn-build-4.3 4.3
+ do_update ~/svn-build
+ do_diff ~/svn-build 5.0
+ do_version ~/svn-build 5.0
rm $LOCK