75 lines
1.6 KiB
Shell
Executable file
75 lines
1.6 KiB
Shell
Executable file
#!/bin/sh
|
|
|
|
#
|
|
# Gradle start up script for POSIX generated by Gradle.
|
|
#
|
|
|
|
# Resolve links: $0 may be a link
|
|
app_path=$0
|
|
|
|
# Determine the Java command to use to start the JVM.
|
|
if [ -n "$JAVA_HOME" ] ; then
|
|
JAVACMD="$JAVA_HOME/bin/java"
|
|
else
|
|
JAVACMD="java"
|
|
fi
|
|
|
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
MAX_FD=maximum
|
|
|
|
warn () {
|
|
echo "$*"
|
|
} >&2
|
|
|
|
die () {
|
|
echo
|
|
echo "$*"
|
|
echo
|
|
exit 1
|
|
} >&2
|
|
|
|
# OS specific support (must be 'true' or 'false').
|
|
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
|
|
|
|
# Determine the app home directory
|
|
APP_HOME=$( cd "${app_path%/*}/" && pwd -P ) || exit
|
|
|
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
|
|
# Collect all arguments for the java command;
|
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
|
# shell script including quotes and variable substitutions, so put them in
|
|
# double quotes to make sure that they get re-expanded; and
|
|
# * put everything else in single quotes, so that it's not re-expanded.
|
|
|
|
set -- \
|
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
-classpath "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
org.gradle.wrapper.GradleWrapperMain \
|
|
"$@"
|
|
|
|
# Stop when "xargs" is not available.
|
|
if ! command -v xargs >/dev/null 2>&1
|
|
then
|
|
die "xargs is not available"
|
|
fi
|
|
|
|
exec "$JAVACMD" "$@"
|