[jboss-svn-commits] JBL Code SVN: r29682 - labs/jbosstm/workspace/adinn/byteman/trunk/bin.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 20 06:17:35 EDT 2009


Author: adinn
Date: 2009-10-20 06:17:35 -0400 (Tue, 20 Oct 2009)
New Revision: 29682

Modified:
   labs/jbosstm/workspace/adinn/byteman/trunk/bin/bmjava.sh
   labs/jbosstm/workspace/adinn/byteman/trunk/bin/bytemancheck.sh
   labs/jbosstm/workspace/adinn/byteman/trunk/bin/submit.sh
Log:
corrected problems in using devel version of bin scripts -- fixes, inter alia, BYTEMAN-51

Modified: labs/jbosstm/workspace/adinn/byteman/trunk/bin/bmjava.sh
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/bin/bmjava.sh	2009-10-20 10:11:18 UTC (rev 29681)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/bin/bmjava.sh	2009-10-20 10:17:35 UTC (rev 29682)
@@ -103,7 +103,7 @@
 # build/lib so add both paths to the classpath just in case
 if [ -r ${BYTEMAN_HOME}/lib/byteman.jar ]; then
     BYTEMAN_JAR=${BYTEMAN_HOME}/lib/byteman.jar
-elif [ -r ${BYTEMAN_HOME}/lib/byteman.jar ]; then
+elif [ -r ${BYTEMAN_HOME}/build/lib/byteman.jar ]; then
     BYTEMAN_JAR=${BYTEMAN_HOME}/build/lib/byteman.jar
 else
     echo "Cannot locate byteman jar"

Modified: labs/jbosstm/workspace/adinn/byteman/trunk/bin/bytemancheck.sh
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/bin/bytemancheck.sh	2009-10-20 10:11:18 UTC (rev 29681)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/bin/bytemancheck.sh	2009-10-20 10:17:35 UTC (rev 29682)
@@ -25,14 +25,31 @@
 #
 # usage: bytemancheck -cp classpath script1 . . . scriptN
 #
+# use BYTEMAN_HOME to locate installed byteman release
+if [ -z "$BYTEMAN_HOME" ]; then
 # use the root of the path to this file to locate the byteman jar
-BASE=${0%*bin/bytemancheck.sh}
+    BYTEMAN_HOME=${0%*/bin/bmjava.sh}
+# allow for rename to plain bmjava
+    if [ "$BYTEMAN_HOME" == "$0" ]; then
+	BYTEMAN_HOME=${0%*/bin/bmjava}
+    fi
+    if [ "$BYTEMAN_HOME" == "$0" ]; then
+	echo "Unable to find byteman home"
+	exit
+    fi
+fi
+
 # the binary release puts byteman jar in lib while source puts it in
 # build/lib so add both paths to the classpath just in case
-CP=${BASE}lib/byteman.jar
-CP=${BASE}build/lib/byteman.jar:${CP}
-# hmm. the asm code should be bundled in the byteman jar?
-CP=${CP}:${BASE}ext/asm-all-3.0.jar
+if [ -r ${BYTEMAN_HOME}/lib/byteman.jar ]; then
+    BYTEMAN_JAR=${BYTEMAN_HOME}/lib/byteman.jar
+elif [ -r ${BYTEMAN_HOME}/build/lib/byteman.jar ]; then
+    BYTEMAN_JAR=${BYTEMAN_HOME}/build/lib/byteman.jar
+else
+    echo "Cannot locate byteman jar"
+    exit
+fi
+CP=${BYTEMAN_JAR}
 # incluide application classes upplied via -cp flag
 if [ "$1" == "-cp" ] ; then
   CP=${CP}:$2

Modified: labs/jbosstm/workspace/adinn/byteman/trunk/bin/submit.sh
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/bin/submit.sh	2009-10-20 10:11:18 UTC (rev 29681)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/bin/submit.sh	2009-10-20 10:17:35 UTC (rev 29682)
@@ -30,16 +30,31 @@
 #   -u uninstall rules in script1 . . . scriptN
 #      with no args uninstall all installed rules
 #
+# use BYTEMAN_HOME to locate installed byteman release
+if [ -z "$BYTEMAN_HOME" ]; then
 # use the root of the path to this file to locate the byteman jar
-BASE=${0%*bin/submit.sh}
+    BYTEMAN_HOME=${0%*/bin/bmjava.sh}
+# allow for rename to plain bmjava
+    if [ "$BYTEMAN_HOME" == "$0" ]; then
+	BYTEMAN_HOME=${0%*/bin/bmjava}
+    fi
+    if [ "$BYTEMAN_HOME" == "$0" ]; then
+	echo "Unable to find byteman home"
+	exit
+    fi
+fi
+
 # the binary release puts byteman jar in lib while source puts it in
 # build/lib so add both paths to the classpath just in case
-CP=${BASE}lib/byteman.jar
-CP=${BASE}build/lib/byteman.jar
-# hmm. the asm code should be bundled in the byteman jar?
-CP=${CP}:${BASE}ext/asm-all-3.0.jar
-
+if [ -r ${BYTEMAN_HOME}/lib/byteman.jar ]; then
+    BYTEMAN_JAR=${BYTEMAN_HOME}/lib/byteman.jar
+elif [ -r ${BYTEMAN_HOME}/build/lib/byteman.jar ]; then
+    BYTEMAN_JAR=${BYTEMAN_HOME}/build/lib/byteman.jar
+else
+    echo "Cannot locate byteman jar"
+    exit
+fi
 # allow for extra java opts via setting BYTEMAN_JAVA_OPTS
 # Submit class will validate arguments
 
-java ${BYTEMAN_JAVA_OPTS} -classpath ${CP} org.jboss.byteman.agent.submit.Submit $*
+java ${BYTEMAN_JAVA_OPTS} -classpath ${BYTEMAN_JAR} org.jboss.byteman.agent.submit.Submit $*



More information about the jboss-svn-commits mailing list