Compare commits

...

5 Commits

Author SHA1 Message Date
Bryan Casey
df952d6f97 Merge pull request #35 from TheCase/checksum_direct_target
distinct filename for checksum
2024-12-03 21:19:11 -07:00
TheCase
5e4f39c6ab distinct filename for checksum 2024-12-03 21:16:34 -07:00
Bryan Casey
3aca16b115 Merge pull request #33 from ChristopherSchultz/main
Allow build to specify and use custom JAVA_HOME
2024-12-03 20:32:12 -07:00
Christopher Schultz
ec5beaba9c Use JAVA_HOME environment variable if set. 2024-12-03 11:15:56 -05:00
Christopher Schultz
75c2e6660f Use the app's bundled / linked java for launch. 2024-12-03 11:15:17 -05:00
2 changed files with 6 additions and 3 deletions

View File

@@ -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

View File

@@ -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"
@@ -57,7 +60,7 @@ if which curl >/dev/null; then
# Check MD5
EXPECTED_CHECKSUM=$(\grep -A3 "tar.gz" "${LOCAL_DOWNLOAD_LOCATION}/CheckSum.txt" | grep MD5 | cut -d':' -f2 | tr -d "[:space:]" | tr '[:upper:]' '[:lower:]')
ACTUAL_CHECKSUM=$(md5sum "${LOCAL_DOWNLOAD_LOCATION}"/IPMIView*.tar* | cut -d' ' -f1 | tr -d "[:space:]" | tr '[:upper:]' '[:lower:]')
ACTUAL_CHECKSUM=$(md5sum "${LOCAL_DOWNLOAD_LOCATION}"/${DOWNLOAD_FILENAME} | cut -d' ' -f1 | tr -d "[:space:]" | tr '[:upper:]' '[:lower:]')
if ! diff <(echo "${EXPECTED_CHECKSUM}") <(echo "${ACTUAL_CHECKSUM}"); then
echo "Checksum is not as expected; download may be corrupted."
echo "Expected: [${EXPECTED_CHECKSUM}]"
@@ -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 . &&