Created
March 15, 2012 16:20
-
-
Save nicksieger/2045059 to your computer and use it in GitHub Desktop.
JRuby launcher script to use in Warbler war files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Simple script to launch JRuby using the components embedded in a war created by Warbler. | |
# Tell Warbler to put this script in /WEB-INF with this config/warble.rb code: | |
# | |
# config.webinf_files += FileList["jruby.sh"] | |
# | |
HERE=`dirname $0` | |
GEM_HOME=$HERE/gems | |
GEM_PATH=$HERE/gems | |
PATH=$PATH:$GEM_HOME/bin | |
CLASSPATH= | |
for jar in $HERE/lib/*.jar; do | |
if [ "$CLASSPATH" ]; then | |
CLASSPATH="$CLASSPATH:$jar" | |
else | |
CLASSPATH="$jar" | |
fi | |
done | |
# Launch JRuby using java | |
java -Xmx512m -cp $CLASSPATH org.jruby.Main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment