Warning, /maui/booth/android_files/gradlew is written in an unsupported language. File is not indexed.

0001 #!/usr/bin/env sh
0002 
0003 ##############################################################################
0004 ##
0005 ##  Gradle start up script for UN*X
0006 ##
0007 ##############################################################################
0008 
0009 # Attempt to set APP_HOME
0010 # Resolve links: $0 may be a link
0011 PRG="$0"
0012 # Need this for relative symlinks.
0013 while [ -h "$PRG" ] ; do
0014     ls=`ls -ld "$PRG"`
0015     link=`expr "$ls" : '.*-> \(.*\)$'`
0016     if expr "$link" : '/.*' > /dev/null; then
0017         PRG="$link"
0018     else
0019         PRG=`dirname "$PRG"`"/$link"
0020     fi
0021 done
0022 SAVED="`pwd`"
0023 cd "`dirname \"$PRG\"`/" >/dev/null
0024 APP_HOME="`pwd -P`"
0025 cd "$SAVED" >/dev/null
0026 
0027 APP_NAME="Gradle"
0028 APP_BASE_NAME=`basename "$0"`
0029 
0030 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
0031 DEFAULT_JVM_OPTS=""
0032 
0033 # Use the maximum available, or set MAX_FD != -1 to use that value.
0034 MAX_FD="maximum"
0035 
0036 warn () {
0037     echo "$*"
0038 }
0039 
0040 die () {
0041     echo
0042     echo "$*"
0043     echo
0044     exit 1
0045 }
0046 
0047 # OS specific support (must be 'true' or 'false').
0048 cygwin=false
0049 msys=false
0050 darwin=false
0051 nonstop=false
0052 case "`uname`" in
0053   CYGWIN* )
0054     cygwin=true
0055     ;;
0056   Darwin* )
0057     darwin=true
0058     ;;
0059   MINGW* )
0060     msys=true
0061     ;;
0062   NONSTOP* )
0063     nonstop=true
0064     ;;
0065 esac
0066 
0067 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
0068 
0069 # Determine the Java command to use to start the JVM.
0070 if [ -n "$JAVA_HOME" ] ; then
0071     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
0072         # IBM's JDK on AIX uses strange locations for the executables
0073         JAVACMD="$JAVA_HOME/jre/sh/java"
0074     else
0075         JAVACMD="$JAVA_HOME/bin/java"
0076     fi
0077     if [ ! -x "$JAVACMD" ] ; then
0078         die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
0079 
0080 Please set the JAVA_HOME variable in your environment to match the
0081 location of your Java installation."
0082     fi
0083 else
0084     JAVACMD="java"
0085     which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
0086 
0087 Please set the JAVA_HOME variable in your environment to match the
0088 location of your Java installation."
0089 fi
0090 
0091 # Increase the maximum file descriptors if we can.
0092 if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
0093     MAX_FD_LIMIT=`ulimit -H -n`
0094     if [ $? -eq 0 ] ; then
0095         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
0096             MAX_FD="$MAX_FD_LIMIT"
0097         fi
0098         ulimit -n $MAX_FD
0099         if [ $? -ne 0 ] ; then
0100             warn "Could not set maximum file descriptor limit: $MAX_FD"
0101         fi
0102     else
0103         warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
0104     fi
0105 fi
0106 
0107 # For Darwin, add options to specify how the application appears in the dock
0108 if $darwin; then
0109     GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
0110 fi
0111 
0112 # For Cygwin, switch paths to Windows format before running java
0113 if $cygwin ; then
0114     APP_HOME=`cygpath --path --mixed "$APP_HOME"`
0115     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
0116     JAVACMD=`cygpath --unix "$JAVACMD"`
0117 
0118     # We build the pattern for arguments to be converted via cygpath
0119     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
0120     SEP=""
0121     for dir in $ROOTDIRSRAW ; do
0122         ROOTDIRS="$ROOTDIRS$SEP$dir"
0123         SEP="|"
0124     done
0125     OURCYGPATTERN="(^($ROOTDIRS))"
0126     # Add a user-defined pattern to the cygpath arguments
0127     if [ "$GRADLE_CYGPATTERN" != "" ] ; then
0128         OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
0129     fi
0130     # Now convert the arguments - kludge to limit ourselves to /bin/sh
0131     i=0
0132     for arg in "$@" ; do
0133         CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
0134         CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
0135 
0136         if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
0137             eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
0138         else
0139             eval `echo args$i`="\"$arg\""
0140         fi
0141         i=$((i+1))
0142     done
0143     case $i in
0144         (0) set -- ;;
0145         (1) set -- "$args0" ;;
0146         (2) set -- "$args0" "$args1" ;;
0147         (3) set -- "$args0" "$args1" "$args2" ;;
0148         (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
0149         (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
0150         (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
0151         (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
0152         (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
0153         (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0154     esac
0155 fi
0156 
0157 # Escape application args
0158 save () {
0159     for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
0160     echo " "
0161 }
0162 APP_ARGS=$(save "$@")
0163 
0164 # Collect all arguments for the java command, following the shell quoting and substitution rules
0165 eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
0166 
0167 # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
0168 if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
0169   cd "$(dirname "$0")"
0170 fi
0171 
0172 exec "$JAVACMD" "$@"