From 9a38c0a39cea36950c0d95553a390575a4e6f543 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch Date: Sun, 17 Feb 2019 21:15:59 +0000 Subject: Make existing scripts work with linux --- scripts/link_windows.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts/link_windows.sh') diff --git a/scripts/link_windows.sh b/scripts/link_windows.sh index be9f7dc..0a5ad6d 100755 --- a/scripts/link_windows.sh +++ b/scripts/link_windows.sh @@ -4,7 +4,14 @@ set -e # Needed if you have a java version other than 11 as default -JAVA_HOME=$(/usr/libexec/java_home -v 11) +echo "JAVA_HOME is set to: $JAVA_HOME" +if [[ "$OSTYPE" == "linux-gnu" ]]; then + JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64' + echo "JAVA_HOME overrided to be: $JAVA_HOME" +elif [[ "$OSTYPE" == "darwin"* ]]; then + JAVA_HOME=$(/usr/libexec/java_home -v 11) + echo "JAVA_HOME overrided to be: $JAVA_HOME" +fi # Compile sources mvn compile @@ -35,4 +42,4 @@ $REAL_JAVA_HOME/bin/jlink \ --add-modules gson,javacs \ --launcher launcher=javacs/org.javacs.Main \ --output dist/windows \ - --compress 2 \ No newline at end of file + --compress 2 -- cgit v1.2.3