Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 50558ec

Browse files
committed
rename local variable $JVMArguments to $MainArgs to avoid naming irritations // refs #46
1 parent e105140 commit 50558ec

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# #
1414
# @author Tobias Fischer #
1515
# @url https://github.com/tofi86/universalJavaApplicationStub #
16-
# @date 2017-09-29 #
16+
# @date 2017-10-28 #
1717
# @version 2.1.0 #
1818
# #
1919
# #
@@ -186,9 +186,9 @@ if [ $exitcode -eq 0 ]; then
186186
fi
187187

188188
# read the JVM Arguments
189-
JVMArguments=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:Arguments" "${InfoPlistFile}" 2> /dev/null | xargs`
189+
MainArgs=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:Arguments" "${InfoPlistFile}" 2> /dev/null | xargs`
190190
# replace occurences of $APP_ROOT with its content
191-
JVMArguments=`eval "echo ${JVMArguments}"`
191+
MainArgs=`eval "echo ${MainArgs}"`
192192

193193
# read the Java version we want to find
194194
JVMVersion=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:JVMVersion" "${InfoPlistFile}" 2> /dev/null | xargs`
@@ -235,10 +235,10 @@ else
235235
# read the JVM Default Options
236236
JVMDefaultOptions=`/usr/libexec/PlistBuddy -c "print :JVMDefaultOptions" "${InfoPlistFile}" 2> /dev/null | grep -o " \-.*" | tr -d '\n' | xargs`
237237

238-
# read the JVM Arguments
239-
JVMArguments=`/usr/libexec/PlistBuddy -c "print :JVMArguments" "${InfoPlistFile}" 2> /dev/null | tr -d '\n' | sed -E 's/Array \{ *(.*) *\}/\1/g' | sed 's/ */ /g' | xargs`
238+
# read the Main Arguments from JVMArguments key (see #46 for naming details)
239+
MainArgs=`/usr/libexec/PlistBuddy -c "print :JVMArguments" "${InfoPlistFile}" 2> /dev/null | tr -d '\n' | sed -E 's/Array \{ *(.*) *\}/\1/g' | sed 's/ */ /g' | xargs`
240240
# replace occurences of $APP_ROOT with its content
241-
JVMArguments=`eval "echo ${JVMArguments}"`
241+
MainArgs=`eval "echo ${MainArgs}"`
242242
fi
243243

244244

@@ -510,7 +510,8 @@ elif [ -f "${JAVACMD}" ] && [ -x "${JAVACMD}" ] ; then
510510
# - JVM options
511511
# - JVM default options
512512
# - main class
513-
# - JVM arguments
513+
# - main arguments
514+
# - passthru arguments
514515
exec "${JAVACMD}" \
515516
-cp "${JVMClassPath}" \
516517
-splash:"${ResourcesFolder}/${JVMSplashFile}" \
@@ -519,7 +520,7 @@ elif [ -f "${JAVACMD}" ] && [ -x "${JAVACMD}" ] ; then
519520
${JVMOptions:+$JVMOptions }\
520521
${JVMDefaultOptions:+$JVMDefaultOptions }\
521522
${JVMMainClass}\
522-
${JVMArguments:+ $JVMArguments}\
523+
${MainArgs:+ $MainArgs}\
523524
${ArgsPassthru:+ $ArgsPassthru}
524525

525526

0 commit comments

Comments
 (0)