Make pack-mode-switcher.sh Dir Check POSIX Compliant (#783)

[BUG]
This commit is contained in:
l0py2 2024-07-01 12:27:10 +01:00 committed by GitHub
parent 9b9c42fc57
commit 60d3069349
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ CURRENT_MODE="$(head .mode)"
CURRENT_MODE=${CURRENT_MODE:="normal"}
# Check if config-overrides dir exists
if [[ ! -d "${NORMAL_CFG}" ]] || [[ ! -d "${EXPERT_CFG}" ]]; then
if [ ! -d "${NORMAL_CFG}" ] || [ ! -d "${EXPERT_CFG}" ]; then
printf "\n\n${RED}Could not find \`config-overrides\` directory! \nMake sure you are in the \`/minecraft\` directory of your instance! (The one containing \`/config\`)${NORMAL}\n"
printf "${YELLOW}Otherwise, if you are in the \`/minecraft\` directory, please try reinstalling the pack.${NORMAL}\n"
exit 1
@ -40,7 +40,7 @@ fi
case $MODE in
N|n|normal|Normal)
cp -rf "$NORMAL_CFG/." ${TARGET}
cp -rf "$NORMAL_CFG/." ${TARGET}
# Only copy server.properties if it exists.
if [ -f "server.properties" ]; then