summarylogtreecommitdiffstats
path: root/mm-startup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mm-startup.patch')
-rw-r--r--mm-startup.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/mm-startup.patch b/mm-startup.patch
new file mode 100644
index 000000000000..21f9080f5f1b
--- /dev/null
+++ b/mm-startup.patch
@@ -0,0 +1,48 @@
+59,65c59
+< if ! test -z "$MEGAMEK_CONFPATH"; then
+< if ! test -d "/.$MEGAMEK_CONFPATH" -a \
+< -f "/.$MEGAMEK_CONFPATH/$MEGAMEK_DEFAULT_JARNAME"; then
+< echo "Relative path: $MEGAMEK_CONFPATH. Clearing."
+< MEGAMEK_CONFPATH=""
+< fi
+< fi
+---
+> # MEGAMEK_CONFPATH may be set before hand, which is not desired.
+67,78c61,66
+< temp_path=$MEGAMEK_DEFAULT_CONFPATH
+< if test -d $temp_path; then
+< MEGAMEK_CONFPATH=$temp_path
+< else
+< # See if we should create the default configuration directory.
+< if test -d $MEGAMEK_DEFAULT_CONFROOT -a \
+< -w $MEGAMEK_DEFAULT_CONFROOT; then
+< mkdir $temp_path
+< if test -d $temp_path; then
+< MEGAMEK_CONFPATH=$temp_path
+< fi
+< fi
+---
+> conf=$HOME/.config/mekhq
+>
+> if [[ -n "$XGD_CONFIG_HOME" ]]
+> then
+> conf="$XDG_CONFIG_HOME/mekhq"
+> fi
+80,85c68,70
+< # If MEGAMEK_CONFPATH is still not set, try the PWD.
+< if test -z "$MEGAMEK_CONFPATH"; then
+< if test -w $PWD; then
+< MEGAMEK_CONFPATH=$PWD
+< fi
+< fi
+---
+> if [[ ! -d "$conf" ]]
+> then
+> mkdir -p "$conf"
+86a72,73
+>
+> MEGAMEK_CONFPATH="$conf"
+90c77
+< if test -z "$MEGAMEK_CONFPATH"; then
+---
+> if ! test -d "$MEGAMEK_CONFPATH"; then