123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- app_path=$0
- while
- APP_HOME=${app_path%"${app_path
- [ -h "$app_path" ]
- do
- ls=$( ls -ld "$app_path" )
- link=${ls
- case $link in
- /*) app_path=$link ;;
- *) app_path=$APP_HOME$link ;;
- esac
- done
- APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
- APP_NAME="Gradle"
- APP_BASE_NAME=${0
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
- MAX_FD=maximum
- warn () {
- echo "$*"
- } >&2
- die () {
- echo
- echo "$*"
- echo
- exit 1
- } >&2
- cygwin=false
- msys=false
- darwin=false
- nonstop=false
- case "$( uname )" in
- CYGWIN* ) cygwin=true ;;
- Darwin* ) darwin=true ;;
- MSYS* | MINGW* ) msys=true ;;
- NONSTOP* ) nonstop=true ;;
- esac
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
- Please set the JAVA_HOME variable in your environment to match the
- location of your Java installation."
- fi
- else
- JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
- Please set the JAVA_HOME variable in your environment to match the
- location of your Java installation."
- fi
- if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in
- max*)
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in
- '' | soft) :;;
- *)
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
- fi
- if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- for arg do
- if
- case $arg in
- -*) false ;;
- /?*) t=${arg
- [ -e "$t" ] ;;
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
-
-
-
-
-
-
-
- shift
- set -- "$@" "$arg"
- done
- fi
- set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
- eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
- exec "$JAVACMD" "$@"
|