blob: ed1b6a18d04240691578b32c247cf9179fed00d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/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
jvm_params=(
"-XX:+UseShenandoahGC"
"-XX:ShenandoahGCHeuristics=compact"
"-XX:+UseStringDeduplication"
"-XX:MaxRAMPercentage=20.0"
"--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED"
)
PATH="/usr/lib/jvm/java-21-openjdk/bin:${PATH}"
# requires preview features: https://github.com/mediathekview/MediathekView/issues/528
java -jar "${jvm_params[@]}" /usr/share/java/mediathekview/MediathekView.jar "$@" "$data_directory"
|