Lines Matching +full:- +full:- +full:no +full:- +full:warn +full:- +full:script +full:- +full:location
4 # Copyright © 2015-2021 the original authors.
10 # https://www.apache.org/licenses/LICENSE-2.0
18 # SPDX-License-Identifier: Apache-2.0
23 # Gradle start up script for POSIX generated by Gradle.
27 # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
29 # bash, then to run this script, type that shell name before the whole
34 # Busybox and similar reduced shells will NOT work, because this script
37 # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
40 # * various built-in commands including «command», «set», and «ulimit».
44 # (2) This script targets any POSIX shell, so it avoids extensions provided
48 # space-separated string is a well documented source of bugs and security
53 # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
54 # see the in-line comments for details.
59 # (3) This script is generated from the Groovy template
60 # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resou…
72 # Need this for daisy-chained symlinks.
74 APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
75 [ -h "$app_path" ]
77 ls=$( ls -ld "$app_path" )
78 link=${ls#*' -> '}
89 APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
92 # Use the maximum available, or set MAX_FD != -1 to use that value.
95 warn () { function
118 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
122 if [ -n "$JAVA_HOME" ] ; then
123 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
129 if [ ! -x "$JAVACMD" ] ; then
133 location of your Java installation."
137 if ! command -v java >/dev/null 2>&1
139 die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
142 location of your Java installation."
150 # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
152 MAX_FD=$( ulimit -H -n ) ||
153 warn "Could not query maximum file descriptor limit"
158 # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
160 ulimit -n "$MAX_FD" ||
161 warn "Could not set maximum file descriptor limit to $MAX_FD"
168 # * -classpath
169 # * -D...appname settings
170 # * --module-path (only if needed)
175 APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
176 CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
178 JAVACMD=$( cygpath --unix "$JAVACMD" )
180 # Now convert the arguments - kludge to limit ourselves to /bin/sh
184 -*) false ;; # don't mess with options #(
186 [ -e "$t" ] ;; #(
190 arg=$( cygpath --path --ignore --mixed "$arg" )
200 set -- "$@" "$arg" # push replacement arg
205 …lt JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206 DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
214 set -- \
215 "-Dorg.gradle.appname=$APP_BASE_NAME" \
216 -classpath "$CLASSPATH" \
221 if ! command -v xargs >/dev/null 2>&1
228 # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
232 # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
233 # set -- "${ARGS[@]}" "$@"
236 # post-process each arg (as a line of input to sed) to backslash-escape any
245 eval "set -- $(
247 xargs -n1 |
248 sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |