7
7
# you may not use this file except in compliance with the License.
8
8
# You may obtain a copy of the License at
9
9
#
10
- # http ://www.apache.org/licenses/LICENSE-2.0
10
+ # https ://www.apache.org/licenses/LICENSE-2.0
11
11
#
12
12
# Unless required by applicable law or agreed to in writing, software
13
13
# distributed under the License is distributed on an "AS IS" BASIS,
82
82
83
83
CLASSPATH=$APP_HOME /gradle/wrapper/gradle-wrapper.jar
84
84
85
+
85
86
# Determine the Java command to use to start the JVM.
86
87
if [ -n " $JAVA_HOME " ] ; then
87
88
if [ -x " $JAVA_HOME /jre/sh/java" ] ; then
@@ -125,10 +126,11 @@ if $darwin; then
125
126
GRADLE_OPTS=" $GRADLE_OPTS \" -Xdock:name=$APP_NAME \" \" -Xdock:icon=$APP_HOME /media/gradle.icns\" "
126
127
fi
127
128
128
- # For Cygwin, switch paths to Windows format before running java
129
- if $cygwin ; then
129
+ # For Cygwin or MSYS , switch paths to Windows format before running java
130
+ if [ " $cygwin " = " true " -o " $msys " = " true " ] ; then
130
131
APP_HOME=` cygpath --path --mixed " $APP_HOME " `
131
132
CLASSPATH=` cygpath --path --mixed " $CLASSPATH " `
133
+
132
134
JAVACMD=` cygpath --unix " $JAVACMD " `
133
135
134
136
# We build the pattern for arguments to be converted via cygpath
@@ -154,19 +156,19 @@ if $cygwin ; then
154
156
else
155
157
eval ` echo args$i ` =" \" $arg \" "
156
158
fi
157
- i=$(( i + 1 ))
159
+ i=` expr $i + 1 `
158
160
done
159
161
case $i in
160
- ( 0) set -- ;;
161
- ( 1) set -- " $args0 " ;;
162
- ( 2) set -- " $args0 " " $args1 " ;;
163
- ( 3) set -- " $args0 " " $args1 " " $args2 " ;;
164
- ( 4) set -- " $args0 " " $args1 " " $args2 " " $args3 " ;;
165
- ( 5) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " ;;
166
- ( 6) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " ;;
167
- ( 7) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " ;;
168
- ( 8) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " " $args7 " ;;
169
- ( 9) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " " $args7 " " $args8 " ;;
162
+ 0) set -- ;;
163
+ 1) set -- " $args0 " ;;
164
+ 2) set -- " $args0 " " $args1 " ;;
165
+ 3) set -- " $args0 " " $args1 " " $args2 " ;;
166
+ 4) set -- " $args0 " " $args1 " " $args2 " " $args3 " ;;
167
+ 5) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " ;;
168
+ 6) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " ;;
169
+ 7) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " ;;
170
+ 8) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " " $args7 " ;;
171
+ 9) set -- " $args0 " " $args1 " " $args2 " " $args3 " " $args4 " " $args5 " " $args6 " " $args7 " " $args8 " ;;
170
172
esac
171
173
fi
172
174
@@ -175,14 +177,9 @@ save () {
175
177
for i do printf %s\\ n " $i " | sed " s/'/'\\\\ ''/g;1s/^/'/;\$ s/\$ /' \\\\ /" ; done
176
178
echo " "
177
179
}
178
- APP_ARGS=$( save " $@ " )
180
+ APP_ARGS=` save " $@ " `
179
181
180
182
# Collect all arguments for the java command, following the shell quoting and substitution rules
181
183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS " \" -Dorg.gradle.appname=$APP_BASE_NAME \" " -classpath " \" $CLASSPATH \" " org.gradle.wrapper.GradleWrapperMain " $APP_ARGS "
182
184
183
- # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184
- if [ " $( uname) " = " Darwin" ] && [ " $HOME " = " $PWD " ]; then
185
- cd " $( dirname " $0 " ) "
186
- fi
187
-
188
185
exec " $JAVACMD " " $@ "
0 commit comments