[jboss-svn-commits] JBL Code SVN: r25387 - in labs/jbosstm/workspace/adinn/orchestration: bin and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Feb 23 10:32:31 EST 2009


Author: adinn
Date: 2009-02-23 10:32:31 -0500 (Mon, 23 Feb 2009)
New Revision: 25387

Added:
   labs/jbosstm/workspace/adinn/orchestration/bin/
   labs/jbosstm/workspace/adinn/orchestration/bin/toastcheck.sh
Log:
script enabling TOAST rules to be type checked offline -- just supply a classpath and a list of script files

Added: labs/jbosstm/workspace/adinn/orchestration/bin/toastcheck.sh
===================================================================
--- labs/jbosstm/workspace/adinn/orchestration/bin/toastcheck.sh	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/orchestration/bin/toastcheck.sh	2009-02-23 15:32:31 UTC (rev 25387)
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# shell script which type checks a TOAST rule set
+#
+# usage: toastcheck -cp classpath script1 . . . scriptN
+#
+BASE=${0%*/bin/toastcheck.sh}
+echo "BASE = $BASE"
+CP=${BASE}/build/lib/orchestration.jar
+CP=${CP}:${BASE}}/ext/asm-all-3.0.jar
+if [ $1 == "-cp" ] ; then
+  CP=${CP}:$2
+  shift
+  shift
+fi
+
+SCRIPT_OPTS=""
+
+if [ $# -eq 0 ] ; then
+   echo "usage: toastcheck -cp classpath script1 . . . scriptN"
+   exit
+fi
+
+if [ ${1#-*} != ${1} ]; then
+   echo "usage: toastcheck -cp classpath script1 . . . scriptN"
+   exit
+fi
+error=0
+while [ $# -ne 0 ]
+do
+  if [ ! -f $1 -o ! -r $1 ] ; then
+    echo "$1 is not a readable file";
+    error=1
+  fi
+  FILES="${FILES} $1";
+  shift
+done
+
+if [ $error -ne 0 ] ; then
+  exit
+fi
+
+java -classpath ${CP} org.jboss.jbossts.orchestration.test.TestScript $FILES




More information about the jboss-svn-commits mailing list