Browse files

debug runner

  • Loading branch information...
1 parent ee58806 commit b41e016a1df1819a86b4a7be250d935a9312ebbc @hofmeister committed Oct 8, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/main/bin/debug
View
19 src/main/bin/debug
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+[ -z $CL_BASEDIR ] && CL_BASEDIR=`dirname "$0"`
+cd $CL_BASEDIR/..
+
+JAVA_OPTS="-server -Xmx1g -XX:OnOutOfMemoryError=bin/kill_ppid -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
+CLASS=com.github.rnewson.couchdb.lucene.Main
+
+CLASSPATH="conf"
+for JAR in `ls lib/*.jar`
+do
+ CLASSPATH="$CLASSPATH:$JAR"
+done
+if [ -z $PIDFILE ]; then
+ exec java $JAVA_OPTS -cp $CLASSPATH $CLASS
+else
+ java $JAVA_OPTS -cp $CLASSPATH $CLASS &
+ echo $! > $PIDFILE
+fi

0 comments on commit b41e016

Please sign in to comment.