summarylogtreecommitdiffstats
path: root/grasscutter-run
blob: b99270225361c02a21c220da05de956c9d756bd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

if [[ "$1" != "-p" ]]; then
    WORKDIR=${XDG_CONFIG_HOME:-$HOME/.config}/grasscutter
    mkdir -p $WORKDIR
    RESDIR=/usr/share/grasscutter/resources
    if [ ! -d $WORKDIR/resources ] && [ -d $RESDIR ]; then
    	ln -s $RESDIR $WORKDIR/resources
    fi
    cd $WORKDIR
fi

exec /usr/bin/java -jar "/usr/share/java/grasscutter/grasscutter.jar" "$@"