forked from ConnorDY/OSRS-Environment-Exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·32 lines (28 loc) · 950 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
debug_params=
java=java
if [ -x "$JAVA_HOME/bin/java" ]; then
java="$JAVA_HOME/bin/java"
fi
contains() {
[ "${1#*"$2"}" != "$1" ]
}
if [ "${1#--debug}" != "$1" ]; then
if contains "$1" "software"; then
export LIBGL_ALWAYS_SOFTWARE=1
fi
export GALLIUM_HUD=cpu,fps\;primitives-generated,frametime
export MESA_DEBUG=incomplete_fbo,context,1
export LIBGL_DEBUG=verbose
if [ -e lwjglx-debug-1.0.0.jar ]; then
debug_params="$debug_params -javaagent:lwjglx-debug-1.0.0.jar -Dorg.lwjglx.NO_THROW"
fi
debug_params="$debug_params -Djoml.debug=true"
if [ -e log-debug.xml ]; then
debug_params="$debug_params -Dlogback.configurationFile=log-debug.xml"
fi
shift
fi
# Get the appropriate version from build.gradle.kts
version=$(grep -oP '(?<=version = ").*(?=")' build.gradle.kts)
exec "$java" $debug_params -jar ./build/libs/osrs-environment-exporter-fat-$version.jar "$@"