From 8f4500d644bc17d7fde6514fc5f53580a966e8e0 Mon Sep 17 00:00:00 2001 From: Judy Ng Date: Mon, 8 Jan 2024 12:53:48 -0500 Subject: [PATCH] Use syntax in gradlew Signed-off-by: Judy Ng --- api/gradlew | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/api/gradlew b/api/gradlew index c9dbfcaafe..0caa3f6c24 100755 --- a/api/gradlew +++ b/api/gradlew @@ -21,27 +21,26 @@ ## Gradle start up script for UN*X ## ############################################################################## - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') if expr "$link" : '/.*' > /dev/null; then PRG="$link" else - PRG=`dirname "$PRG"`"/$link" + PRG=$(dirname "$PRG")"/$link" fi done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null || exit -APP_HOME="`pwd -P`" +SAVED="$(pwd)" +cd "$(dirname "$PRG")/" >/dev/null || exit +APP_HOME="$(pwd -P)" cd "$SAVED" >/dev/null || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=$(basename "$0") # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -65,7 +64,7 @@ cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in +case "$(uname)" in CYGWIN* ) cygwin=true ;; @@ -178,7 +177,7 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=`save "$@"` +APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"