blob: 87efb168a899a3b075af331766c621cc1c467c4e (
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
|
#!/bin/bash
# Usage: $0 [DATA_DIR] [NAME]
set -e
set -x
function variables() {
NAME="${2:-multimc5}"
if [ "${1}" ]; then
DATA_DIR="${1}"
else
if [ "${XDG_DATA_HOME}" ]; then
DATA_DIR="${XDG_DATA_HOME}/${NAME}"
elif [ -d "${HOME}/.local/share" ]; then
DATA_DIR="${HOME}/.local/share/${NAME}"
else
DATA_DIR="${HOME}/.${NAME}"
fi
fi
echo ${DATA_DIR}
}
function main() {
variables $@
mkdir --parents "${DATA_DIR}"
/usr/lib/multimc5/MultiMC5 --dir "${DATA_DIR}" | \
/usr/lib/multimc5/MultiMC --dir "${DATA_DIR}"
}
main $@
|