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