summaryrefslogtreecommitdiff
path: root/media-tv/tvbrowser-bin/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /media-tv/tvbrowser-bin/files
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'media-tv/tvbrowser-bin/files')
-rw-r--r--media-tv/tvbrowser-bin/files/tvbrowser28
1 files changed, 28 insertions, 0 deletions
diff --git a/media-tv/tvbrowser-bin/files/tvbrowser b/media-tv/tvbrowser-bin/files/tvbrowser
new file mode 100644
index 000000000000..5222bd3b8147
--- /dev/null
+++ b/media-tv/tvbrowser-bin/files/tvbrowser
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# These variables are induced by the ebuild during the build process
+P=
+JAVA_SLOT=
+
+POSSIBLE_JAVA_PROGRAM_DIRS=(
+ /usr/lib*/openjdk-${JAVA_SLOT}
+ /opt/openjdk-bin-${JAVA_SLOT}
+ /opt/openjdk-jre-bin-${JAVA_SLOT}
+)
+
+for POSSIBLE_DIR in ${POSSIBLE_JAVA_PROGRAM_DIRS[@]}; do
+ if [[ -x ${POSSIBLE_DIR}/bin/java ]]; then
+ export JAVA_PROGRAM_DIR="${POSSIBLE_DIR}/bin/"
+ break
+ fi
+done
+
+if [ -z "$JAVA_PROGRAM_DIR" ]; then
+ echo "Could not find a suitable Java ${JAVA_SLOT} installation!"
+ exit 1
+fi
+
+cd "/opt/${P}"
+echo ${JAVA_PROGRAM_DIR}java -Xms16m -Xmx1G --module-path="lib:tvbrowser.jar" -Djava.library.path="./" -splash:imgs/splash.png -Dpropertiesfile=linux.properties -m tvbrowser/tvbrowser.TVBrowser "$@"
+${JAVA_PROGRAM_DIR}java -Xms16m -Xmx1G --module-path="lib:tvbrowser.jar" -Djava.library.path="./" -splash:imgs/splash.png -Dpropertiesfile=linux.properties -m tvbrowser/tvbrowser.TVBrowser "$@"
+