aboutsummaryrefslogtreecommitdiffstats
path: root/docs/sandbox/inoculated/buildRun.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sandbox/inoculated/buildRun.sh')
-rw-r--r--docs/sandbox/inoculated/buildRun.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/sandbox/inoculated/buildRun.sh b/docs/sandbox/inoculated/buildRun.sh
new file mode 100644
index 000000000..8f3c283c3
--- /dev/null
+++ b/docs/sandbox/inoculated/buildRun.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+JDKDIR="${JDKDIR:-${JAVA_HOME:-`setjdk.sh`}}"
+AJ_HOME="${AJ_HOME:-`setajhome.sh`}"
+PS="${PS:-;}"
+ajrt=`pathtojava.sh "$AJ_HOME/lib/aspectjrt.jar"`
+mkdir -p ../classes
+
+for i in *.java; do
+ pack=`sed -n '/package/s|.*package *\([^ ][^ ]*\)[ ;].*|\1|p' "$i"`
+ [ -n "$pack" ] && pack="${pack}."
+ rm -rf classes/*
+ cname=$pack`basename $i .java`
+ echo ""
+ echo "########## $cname"
+ $AJ_HOME/bin/ajc -d ../classes -classpath "$ajrt" "$i"
+ && $JDKDIR/bin/java -classpath "../classes${PS}$ajrt" $cname
+done
+
+rm -rf ../classes