summarylogtreecommitdiffstats
path: root/server-cli-wrapper.sh
blob: e879fb03d74b4e3ec82da418d2c45b81f277db63 (plain)
1
2
3
4
5
6
7
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-cli "$@"