summarylogtreecommitdiffstats
path: root/mm-server.patch
blob: e09fd4bb9c00e0b22a8f99e07d8f1e98134a885c (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
60,66c60
< 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.
68,79c62,67
<     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
81,86c69,71
<         # 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"
87a73,74
> 
>     MEGAMEK_CONFPATH="$conf"
91c78
< if test -z "$MEGAMEK_CONFPATH"; then
---
> if ! test -d "$MEGAMEK_CONFPATH"; then