summaryrefslogtreecommitdiff
blob: 9866fec91a847e28444673b1dd75712abb76a16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Config files are written to current directory, so make a config dir and pushd there

if [[ ! -z "${XDG_CONFIG_DIR}" ]] ; then
    config_dir="${XDG_CONFIG_DIR}/pogo-manager"
elif [[ ! -z "${HOME}" ]] ; then
    config_dir="${HOME}/.config/pogo-manager"
else
    config_dir="$(mktemp -d)"
fi

echo "Using ${config_dir} for configuration files"
mkdir -p "${config_dir}"
pushd "${config_dir}" > /dev/null
java -Dfile.encoding=UTF-8 -jar /opt/pogo-manager/pogo-manager.jar