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

Commit 50d24bf

Browse files
committed
Support JVMVersion also in Oracle PList style // fixes #59
1 parent 00cdf26 commit 50d24bf

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,7 @@ if [ $exitcode -eq 0 ]; then
227227

228228
# read the Java version we want to find
229229
JVMVersion=$(plist_get_java ':JVMVersion' | xargs)
230-
if [[ ${JVMVersion} == *";"* ]]; then
231-
minMaxArray=(${JVMVersion//;/ })
232-
JVMVersion=${minMaxArray[0]//+}
233-
JVMMaxVersion=${minMaxArray[1]//+}
234-
fi
235-
stub_logger "[JavaRequirement] JVM minimum version: ${JVMVersion}"
236-
stub_logger "[JavaRequirement] JVM maximum version: ${JVMMaxVersion}"
230+
# post processing of the version string follows below...
237231

238232

239233
# read 'Info.plist' file in Oracle style
@@ -283,10 +277,24 @@ else
283277
IFS=$'\t\n'
284278
MainArgs=($(xargs -n1 <<<$(plist_get ':JVMArguments' | tr -d '\n' | sed -E 's/Array \{ *(.*) *\}/\1/g' | sed 's/ */ /g')))
285279
unset IFS
286-
# post processing of the array follows below...
280+
# post processing of the array follows further below...
281+
282+
# read the Java version we want to find
283+
JVMVersion=$(plist_get ':JVMVersion' | xargs)
284+
# post processing of the version string follows below...
287285
fi
288286

289287

288+
289+
# JVMVersion: post processing and optional splitting
290+
if [[ ${JVMVersion} == *";"* ]]; then
291+
minMaxArray=(${JVMVersion//;/ })
292+
JVMVersion=${minMaxArray[0]//+}
293+
JVMMaxVersion=${minMaxArray[1]//+}
294+
fi
295+
stub_logger "[JavaRequirement] JVM minimum version: ${JVMVersion}"
296+
stub_logger "[JavaRequirement] JVM maximum version: ${JVMMaxVersion}"
297+
290298
# MainArgs: replace occurences of $APP_ROOT with its content
291299
MainArgsArr=()
292300
for i in "${MainArgs[@]}"

0 commit comments

Comments
 (0)