rename plain builds into k22
[infrastructure.git] / scripts / vbuild-nightly.sh
index b8d4dd9..aabceb9 100755 (executable)
@@ -1,9 +1,22 @@
 #!/bin/bash
 REVISION=$(echo '$Revision: 1053 $' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' )
 COMMAND=$(basename $0)
-SVNPATH="http://svn.one-lab.org/build/trunk"
+SVNPATH="http://svn.planet-lab.org/svn/build/trunk"
 
-cd /tmp
-svn cat $SVNPATH/$COMMAND  > $COMMAND
-chmod +x $COMMAND
-$COMMAND "$@"
+# scan args for any -s option, and SVNPATH in this case
+function scan_svnpath () {
+    while [[ -n "$@" ]] ; do
+       if [ "$1" == "-s" ] ; then
+           SVNPATH="$2"
+       fi
+       shift
+    done
+}
+
+scan_svnpath "$@"
+
+tmp=/tmp/$COMMAND-$$
+svn cat $SVNPATH/$COMMAND  > $tmp
+chmod +x $tmp
+$tmp "$@"
+rm $tmp