Guest

glauber

By: a guest on Nov 11th, 2010  |  syntax: Bash  |  size: 1.10 KB  |  hits: 126  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1.     case "$1" in
  2.     # Stuff after '-J' in this argument goes to JVM
  3.     -J*)
  4.         val=${1:2}
  5.         if [ "${val:0:4}" = "-Xmx" ]; then
  6.             JAVA_MEM=$val
  7.         elif [ "${val:0:4}" = "-Xss" ]; then
  8.             JAVA_STACK=$val
  9.         elif [ "${val}" = "" ]; then
  10.             $JAVA_CMD -help
  11.             echo "(Prepend -J in front of these options when using 'jruby' command)"
  12.             exit
  13.         elif [ "${val}" = "-X" ]; then
  14.             $JAVA_CMD -X
  15.             echo "(Prepend -J in front of these options when using 'jruby' command)"
  16.             exit
  17.         elif [ "${val}" = "-classpath" ]; then
  18.             CP="$CP$CP_DELIMITER$2"
  19.             CLASSPATH=""
  20.             shift
  21.         elif [ "${val}" = "-cp" ]; then
  22.             CP="$CP$CP_DELIMITER$2"
  23.             CLASSPATH=""
  24.             shift
  25.         else
  26.             if [ "${val:0:3}" = "-ea" ]; then
  27.                 VERIFY_JRUBY="yes"
  28.             elif [ "${val:0:16}" = "-Dfile.encoding=" ]; then
  29.                 JAVA_ENCODING=$val
  30.             fi
  31.             java_args=("${java_args[@]}" "${1:2}")
  32.         fi
  33.         ;;