summarylogtreecommitdiffstats
path: root/server-cli-wrapper.sh
diff options
context:
space:
mode:
authorMckol2021-02-02 21:40:46 +0100
committerMckol2021-02-02 22:01:40 +0100
commit3a0d473d8d6924454790aa882cfe479bb972178e (patch)
tree747dda564117478ed04272fdc916bb06fdaf87b1 /server-cli-wrapper.sh
parent006aa3a571c1d42077e260fe2f27cdbe917c8386 (diff)
downloadaur-3a0d473d8d6924454790aa882cfe479bb972178e.tar.gz
Actually fixed 0.8.0 + some minor fixes
- The fix: Added wrappers around `veloren-voxygen` and `veloren-server-cli` to set `VELOREN_USERDATA`, matching the behaviour of Veloren compiled with `VELOREN_USERDATA_STRATEGY=SYSTEM`. - Now using the .desktop and icon files provided in the source tree instead of bundled custom ones - Started using .metainfo.xml file from the source tree
Diffstat (limited to 'server-cli-wrapper.sh')
-rwxr-xr-xserver-cli-wrapper.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/server-cli-wrapper.sh b/server-cli-wrapper.sh
new file mode 100755
index 000000000000..6c6342f147fd
--- /dev/null
+++ b/server-cli-wrapper.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# This wrapper makes server-cli behave as if it was compiled with `VELOREN_USERDATA_STRATEGY=SYSTEM`
+
+not_found_error="Couldn't find a path for user data. Try setting VELOREN_USERDATA or XDG_DATA_HOME."
+[ $XDG_DATA_HOME ] && xdg_path=$XDG_DATA_HOME/veloren/userdata
+export VELOREN_USERDATA=${VELOREN_USERDATA-"${xdg_path-${HOME?$not_found_error}/.local/share/veloren/userdata}"}
+
+/usr/lib/veloren/server "$@"