This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
multimc5-offline/multimc5.sh
Taylor Smock 375287bfaf Updated to 0.4.10
* Removed code that allowed for switching save directories
	* make install has the bin name as MultiMC not MultiMC5.
		Start script can use either name.
2016-01-22 07:58:32 -07:00

27 lines
546 B
Bash
Executable file

#!/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 $@