summarylogtreecommitdiffstats
path: root/megamek.sh
diff options
context:
space:
mode:
Diffstat (limited to 'megamek.sh')
-rw-r--r--megamek.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/megamek.sh b/megamek.sh
new file mode 100644
index 000000000000..d717cea29e80
--- /dev/null
+++ b/megamek.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+conf=$HOME/.config/mekhq
+
+if [[ -n "$XGD_CONFIG_HOME" ]]
+then
+ conf="$XDG_CONFIG_HOME/mekhq"
+fi
+
+if [[ ! -d "$conf" ]]
+then
+ mkdir -p "$conf"
+fi
+
+if [[ ! -d "$conf/mmconf" ]]
+then
+ cp -af /usr/lib/mekhq/* "$conf/"
+fi
+
+exec env MEGAMEK_CONFPATH="$conf" "$conf/mm-startup.sh"