pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

igv: Check Java version



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Mon Feb 22 16:43:53 2021 -0600
Changeset:	f7852150fc0c42f981fd2623361bcb1d9f4fb88d

Modified Files:
	igv/files/igv.sh.in

Log Message:
igv: Check Java version

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f7852150fc0c42f981fd2623361bcb1d9f4fb88d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 igv/files/igv.sh.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diffs:
diff --git a/igv/files/igv.sh.in b/igv/files/igv.sh.in
old mode 100644
new mode 100755
index 89b36a93fa..c5bb82af74
--- a/igv/files/igv.sh.in
+++ b/igv/files/igv.sh.in
@@ -1,6 +1,15 @@
 #!/bin/sh
 
 # Replace this with bundled igv.sh?
+if ! java -version 2>&1 | head -n 1 | fgrep '"11.'; then
+    printf "You need Java 11 to run IGV.\n"
+    exit 1
+fi
+
+# MacOS openjdk11
+if [ -e /usr/libexec/java_home ]; then
+    export JAVA_HOME=$(/usr/libexec/java_home)
+fi
 
 java -showversion --module-path="%%JAVAJARDIR%%/igv" -Xmx4g \
     @"%%JAVAJARDIR%%/igv/igv.args" \


Home | Main Index | Thread Index | Old Index