Compare commits

...

3 Commits

Author SHA1 Message Date
Christopher Schultz
346b3ade86 Merge 187c4c9e99 into 47f80f10c3 2025-01-05 09:08:10 -05:00
Christopher Schultz
187c4c9e99 Give more explanation about Rosetta. 2025-01-05 08:45:48 -05:00
Christopher Schultz
47f80f10c3 Use md5 binary instead of md5sum (#38) 2025-01-04 01:14:43 -08:00

View File

@@ -61,7 +61,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}"/${DOWNLOAD_FILENAME} | cut -d' ' -f1 | tr -d "[:space:]" | tr '[:upper:]' '[:lower:]')
ACTUAL_CHECKSUM=$(md5 -r "${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}]"
@@ -91,14 +91,27 @@ elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then
if [ "x86_64" != "$jarch" ] ; then
echo "*"
echo "* This application bundle requires on x86-64 Java Runtime Environment (JRE/JDK)"
echo "* to run properly."
echo "*"
echo "* Java platform is $jarch for JAVA_HOME=$JAVA_HOME. Set JAVA_HOME to an x86-64 JRE and run this script again."
echo "* The Java platform is $jarch for JAVA_HOME=$JAVA_HOME"
echo "*"
echo "* Set your JAVA_HOME environment variable to an x86-64 JRE/JDK"
echo "* and run this script again."
echo "*"
echo "* In order to run an x86-64 JRE/JDK on your ${arch} computer, you will"
echo "* need to install Apple's Rosetta 2 software."
echo "*"
if arch -x86_64 /usr/bin/true 2> /dev/null; then
echo "Rosetta 2 appears to be installed, so you will already be able to run the x86-64 JRE/JDK."
echo "* Rosetta 2 appears to be installed, so you will already be able to run"
echo "* the x86-64 JRE/JDK once you install it (if necessary) and set JAVA_HOME"
echo "* to point to it."
else
echo "You may also need to install Rosetta 2 to run an x86-64 Java Runtime Environment."
echo "* Rosetta 2 can't be detected on this system, so it is probably not installed."
echo "* You can install it using this command:"
echo
echo "* softwareupdate --install-rosetta"
echo "*"
fi
echo