annotate gradlew @ 31:0bc0b4798d9e

fix saystring(12) command for proper unicode and document it
author Carl Byington <carl@five-ten-sg.com>
date Sun, 28 Apr 2019 14:45:56 -0700
parents a5f1c68e4519
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 #!/usr/bin/env bash
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3 ##############################################################################
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 ##
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 ## Gradle start up script for UN*X
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6 ##
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
7 ##############################################################################
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
8
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10 DEFAULT_JVM_OPTS=""
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 APP_NAME="Gradle"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13 APP_BASE_NAME=`basename "$0"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15 # Use the maximum available, or set MAX_FD != -1 to use that value.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 MAX_FD="maximum"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 warn ( ) {
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 echo "$*"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20 }
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 die ( ) {
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 echo
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24 echo "$*"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 echo
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 exit 1
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27 }
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
28
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
29 # OS specific support (must be 'true' or 'false').
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
30 cygwin=false
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
31 msys=false
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
32 darwin=false
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
33 case "`uname`" in
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
34 CYGWIN* )
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
35 cygwin=true
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36 ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 Darwin* )
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38 darwin=true
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39 ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 MINGW* )
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
41 msys=true
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42 ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43 esac
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
44
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45 # Attempt to set APP_HOME
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
46 # Resolve links: $0 may be a link
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
47 PRG="$0"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
48 # Need this for relative symlinks.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
49 while [ -h "$PRG" ] ; do
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
50 ls=`ls -ld "$PRG"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
51 link=`expr "$ls" : '.*-> \(.*\)$'`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52 if expr "$link" : '/.*' > /dev/null; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53 PRG="$link"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
54 else
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 PRG=`dirname "$PRG"`"/$link"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
56 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 done
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58 SAVED="`pwd`"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 cd "`dirname \"$PRG\"`/" >/dev/null
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60 APP_HOME="`pwd -P`"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
61 cd "$SAVED" >/dev/null
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65 # Determine the Java command to use to start the JVM.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 if [ -n "$JAVA_HOME" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
67 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 # IBM's JDK on AIX uses strange locations for the executables
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 JAVACMD="$JAVA_HOME/jre/sh/java"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
70 else
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71 JAVACMD="$JAVA_HOME/bin/java"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 if [ ! -x "$JAVACMD" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74 die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76 Please set the JAVA_HOME variable in your environment to match the
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77 location of your Java installation."
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 else
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80 JAVACMD="java"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 Please set the JAVA_HOME variable in your environment to match the
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84 location of your Java installation."
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 # Increase the maximum file descriptors if we can.
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88 if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89 MAX_FD_LIMIT=`ulimit -H -n`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 if [ $? -eq 0 ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 MAX_FD="$MAX_FD_LIMIT"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 ulimit -n $MAX_FD
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 if [ $? -ne 0 ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96 warn "Could not set maximum file descriptor limit: $MAX_FD"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 else
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99 warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
100 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
101 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
103 # For Darwin, add options to specify how the application appears in the dock
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
104 if $darwin; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
105 GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
106 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
107
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
108 # For Cygwin, switch paths to Windows format before running java
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
109 if $cygwin ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110 APP_HOME=`cygpath --path --mixed "$APP_HOME"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
111 CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
112 JAVACMD=`cygpath --unix "$JAVACMD"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
113
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
114 # We build the pattern for arguments to be converted via cygpath
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
115 ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
116 SEP=""
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
117 for dir in $ROOTDIRSRAW ; do
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
118 ROOTDIRS="$ROOTDIRS$SEP$dir"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
119 SEP="|"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
120 done
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
121 OURCYGPATTERN="(^($ROOTDIRS))"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
122 # Add a user-defined pattern to the cygpath arguments
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
123 if [ "$GRADLE_CYGPATTERN" != "" ] ; then
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
124 OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
125 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
126 # Now convert the arguments - kludge to limit ourselves to /bin/sh
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
127 i=0
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
128 for arg in "$@" ; do
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
129 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
130 CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
131
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
132 if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
133 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
134 else
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
135 eval `echo args$i`="\"$arg\""
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
136 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
137 i=$((i+1))
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
138 done
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
139 case $i in
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
140 (0) set -- ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
141 (1) set -- "$args0" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
142 (2) set -- "$args0" "$args1" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
143 (3) set -- "$args0" "$args1" "$args2" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
144 (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
145 (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
146 (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
147 (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
148 (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
149 (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
150 esac
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
151 fi
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
152
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
153 # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
154 function splitJvmOpts() {
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
155 JVM_OPTS=("$@")
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
156 }
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
157 eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
158 JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
159
a5f1c68e4519 starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
160 exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"