diff options
author | PandaNinjas <admin@malwarefight.gq> | 2023-02-10 12:09:09 -0800 |
---|---|---|
committer | PandaNinjas <admin@malwarefight.gq> | 2023-02-10 12:09:09 -0800 |
commit | fd5a8ddc7312e4ddfbed0e0fba89b785f1b89416 (patch) | |
tree | b6407ff75924ff20811fa5b4af44dffb3e119c0a /gradlew | |
parent | 45e050e70fd22734be71ddf5e16b012b48a93cde (diff) | |
download | NoSession-fd5a8ddc7312e4ddfbed0e0fba89b785f1b89416.tar.gz NoSession-fd5a8ddc7312e4ddfbed0e0fba89b785f1b89416.tar.bz2 NoSession-fd5a8ddc7312e4ddfbed0e0fba89b785f1b89416.zip |
Fix the gradle wrapper
Diffstat (limited to 'gradlew')
-rwxr-xr-x | gradlew | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -1,5 +1,5 @@ -#!/usr/bin/env bash -set -x +#!/usr/bin/env sh + ############################################################################## ## ## Gradle start up script for UN*X @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -154,16 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +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" # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then cd "$(dirname "$0")" fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" |