From 75c2e6660f76bc0a09ca79580473d7d752b3ed6b Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Tue, 3 Dec 2024 11:15:17 -0500 Subject: [PATCH 1/2] Use the app's bundled / linked java for launch. --- Contents/MacOS/IPMIView | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contents/MacOS/IPMIView b/Contents/MacOS/IPMIView index 0448392..f12d6e3 100755 --- a/Contents/MacOS/IPMIView +++ b/Contents/MacOS/IPMIView @@ -1,4 +1,4 @@ #!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "${DIR}/../Resources/IPMIView" -java -jar IPMIView20.jar +"${DIR}/../Resources/IPMIView/Contents/Home/bin/java" -jar IPMIView20.jar From ec5beaba9c5b5fdde71544eada7dda56ab0eefdb Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Tue, 3 Dec 2024 11:15:56 -0500 Subject: [PATCH 2/2] Use JAVA_HOME environment variable if set. --- script.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index eacd86b..b51616f 100644 --- a/script.sh +++ b/script.sh @@ -1,5 +1,8 @@ #!/bin/bash set - +if [ "" = "${JAVA_HOME}" ] ; then + JAVA_HOME=/usr +fi BASE_URL="https://www.supermicro.com/en/support/resources" INFO_URL="${BASE_URL}/downloadcenter/smsdownload\?category\=IPMI" @@ -84,7 +87,7 @@ tar -zxf "${LOCAL_DOWNLOAD_LOCATION}"/IPMIView*.tar* --strip=1 -C ./Contents/Res { echo "Something went wrong, check download of IPMIView archive" && exit 1; } echo "Linking 'java' and 'jre'..." -ln -s /usr/bin/java Contents/Resources/IPMIView/Contents/Home/bin/java +ln -s "${JAVA_HOME}/bin/java" Contents/Resources/IPMIView/Contents/Home/bin/java rm -rf Contents/Resources/IPMIView/jre/* pushd Contents/Resources/IPMIView/jre/ >/dev/null && ln -s ../Contents . &&