wrapper to scan args & set SVNPATH as apprpriate
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Fri, 27 Jun 2008 07:29:19 +0000 (07:29 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Fri, 27 Jun 2008 07:29:19 +0000 (07:29 +0000)
scripts/vbuild-nightly.sh

index 357e74f..aabceb9 100755 (executable)
@@ -3,6 +3,18 @@ REVISION=$(echo '$Revision: 1053 $' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' )
 COMMAND=$(basename $0)
 SVNPATH="http://svn.planet-lab.org/svn/build/trunk"
 
+# 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