diff options
author | Michael Lass | 2017-06-27 20:49:19 +0200 |
---|---|---|
committer | Michael Lass | 2017-06-27 20:49:19 +0200 |
commit | e1ea76b06d11f61c305b922f93247514bd94845e (patch) | |
tree | e18363f712a2f87fc91e94503cad54f9b7ab6f7a /tvbrowser.sh | |
parent | ec3a587a34d3569dcbec3027fcabf5a5d33432fc (diff) | |
download | aur-e1ea76b06d11f61c305b922f93247514bd94845e.tar.gz |
Update to 4
TV-Browser now requires Java 8. Since some people still have Java 7 installed,
implement some heuristic in the start script to choose a suitable JRE.
Diffstat (limited to 'tvbrowser.sh')
-rw-r--r-- | tvbrowser.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tvbrowser.sh b/tvbrowser.sh index aa72000fab1b..0b946de433f5 100644 --- a/tvbrowser.sh +++ b/tvbrowser.sh @@ -1,4 +1,11 @@ #!/bin/sh -cd /usr/share/java/tvbrowser -java -jar tvbrowser.jar -ignorejvm "$@" +cd /usr/share/java/tvbrowser/ + +if [[ "$(archlinux-java get)" == java-8-* ]]; then + exec /usr/bin/java -jar tvbrowser.jar -ignorejvm "$@" +else + # Force usage of latest java version + JVM_PATH=$(find /usr/lib/jvm/* -maxdepth 0 -type d | sort | tail -n1) + exec $JVM_PATH/jre/bin/java -jar tvbrowser.jar -ignorejvm "$@" +fi |