Last active
July 30, 2024 07:49
-
-
Save konstruktoid/00c37493ef8bfb5d12025cea46a2b970 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MAX_RAM_IN_MB=768 | |
DEBUG=0 | |
if [ -f '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java' ]; then | |
JAVA='/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java' | |
else | |
JAVA=java | |
if ! command -v $JAVA 1>/dev/null 2>&1; then | |
echo "Error: Java is not in the system PATH." | |
exit 1 | |
fi | |
fi | |
JAVA_VERSION_RAW="$("$JAVA" -version 2>&1)" | |
if ! echo "$JAVA_VERSION_RAW" | grep 'version\s*\("1\.8\.[0-9]*_[0-9]*"\|"9"\|"1[0-9][.-].*"\)'; then | |
echo "Error: The version of Java you are attempting to use is not compatible with CISCAT:" | |
echo "" | |
echo "$JAVA_VERSION_RAW" | |
echo "" | |
echo "You must use Java 1.6.x, 1.7.x, or 1.8.x. The most recent version of Java is recommended." | |
exit 1; | |
fi | |
if [ $DEBUG -eq "1" ]; then | |
"$JAVA" -Xmx${MAX_RAM_IN_MB}M -jar Assessor-CLI.jar "$@" --verbose | |
else | |
"$JAVA" -Xmx${MAX_RAM_IN_MB}M -jar Assessor-CLI.jar "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment