blob: e98a1c650e7390696a3943b710f9e33b48536677 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
# Handle data directory to be compliant to XDG Base Directory specification.
data_directory="${XDG_DATA_HOME:-$HOME/.local/share}/mediathekview"
upstream_default="$HOME/.mediathek3"
if [ -d "$upstream_default" ] && [ ! -d "$data_directory" ]; then
# migrate existing data
mv -v "$upstream_default" "$data_directory"
fi
java_options=(
# the application enforces the use of certain JVM parameters:
# https://github.com/mediathekview/MediathekView/blob/14.0.0/src/main/java/mediathek/Main.java#L286
-XX:+UseShenandoahGC
-XX:ShenandoahGCHeuristics=compact
-XX:+UseStringDeduplication
-XX:MaxRAMPercentage=25 # use the default 25%
--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED
-DexternalUpdateCheck # disable automatic update check
-jar /usr/share/java/mediathekview/MediathekView.jar
)
PATH="/usr/lib/jvm/java-JAVA_VERSION-openjdk/bin:${PATH}"
exec java "${java_options[@]}" "$@" "$data_directory"
|