Using sbt in Cygwin, run the “~run” of play2, can&

2019-08-11 08:39发布

When I use sbt in cygwin terminal. run the "~run", how to send Ctrl + D.


sbt script file

#! /usr/bin/env sh

if [ -z "${JPDA_PORT}" ]; then
  DEBUG_PARAM=""
else
  DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi

dir=`dirname $0`
SBT_LAUNCH_JAR=sbt-launch-0.11.2.jar
if [ `uname -o` == "Cygwin" ]
then
  SBT_LAUNCH_JAR_PATH=$(cygpath -w -a $dir/$SBT_LAUNCH_JAR)
  JLINE_TERMINAL=-Djline.terminal=jline.UnixTerminal
else 
  SBT_LAUNCH_JAR_PATH=$dir/$SBT_LAUNCH_JAR
fi

JAVA_ARGS="-Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M $JLINE_TERMINAL -Dfile.encoding=UTF8"

java ${DEBUG_PARAM} ${JAVA_ARGS} -jar $SBT_LAUNCH_JAR_PATH "$@"

cygwin environment

CYGWIN=nodosfilewarning,tty

1条回答
等我变得足够好
2楼-- · 2019-08-11 08:57
#! /usr/bin/env sh

if [ -z "${JPDA_PORT}" ]; then
  DEBUG_PARAM=""
else
  DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi

dir=`dirname $0`
SBT_LAUNCH_JAR=sbt-launch-0.11.2.jar
JAVA_ARGS="-Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8"

if [ `uname -o` == "Cygwin" ]
then
  SBT_LAUNCH_JAR_PATH=$(cygpath -w -a $dir/$SBT_LAUNCH_JAR)
  JLINE_TERMINAL=-Djline.terminal=jline.UnixTerminal
  stty -icanon min 1 -echo > /dev/null 2>&1
  java ${DEBUG_PARAM} ${JAVA_ARGS} $JLINE_TERMINAL -jar $SBT_LAUNCH_JAR_PATH "$@"
  stty icanon echo > /dev/null 2>&1
else 
  SBT_LAUNCH_JAR_PATH=$dir/$SBT_LAUNCH_JAR
  java ${DEBUG_PARAM} ${JAVA_ARGS} -jar $SBT_LAUNCH_JAR_PATH "$@"
fi
查看更多
登录 后发表回答