Corrected locating of CF modpack server jar when not using server script (#852)

This commit is contained in:
Tyler Heucke 2021-04-30 09:05:56 -07:00 committed by GitHub
parent 3261fbd7e9
commit 4be4fc4808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,8 +60,8 @@ if ! isTrue ${USE_MODPACK_START_SCRIPT:-true}; then
mkdir -p ${FTB_BASE_DIR} mkdir -p ${FTB_BASE_DIR}
unzip -o "${FTB_SERVER_MOD}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}' unzip -o "${FTB_SERVER_MOD}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
SERVER=$(find ${FTB_BASE_DIR} -type f -not -name "forge*installer.jar" -name "forge*.jar") serverJar=$(find ${FTB_BASE_DIR} -type f -path "*/libraries/*" -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
if [[ -z "$SERVER" ]]; then if [[ -z "$serverJar" ]]; then
if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then
loadForgeVars "${FTB_BASE_DIR}/settings.cfg" loadForgeVars "${FTB_BASE_DIR}/settings.cfg"
@ -89,15 +89,14 @@ if ! isTrue ${USE_MODPACK_START_SCRIPT:-true}; then
fi fi
echo "${FTB_SERVER_MOD}" > $installMarker echo "${FTB_SERVER_MOD}" > $installMarker
SERVER=$(find ${FTB_BASE_DIR} -type f -not -name "forge*installer.jar" -name "forge*.jar")
fi fi
export SERVER=$(find ${FTB_BASE_DIR} -type f -path "*/libraries/*" -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
log "ERROR unable to locate installed forge server jar" log "ERROR unable to locate installed forge server jar"
isDebugging && find ${FTB_BASE_DIR} -name "forge*.jar" isDebugging && find ${FTB_BASE_DIR} -name "forge*.jar"
exit 2 exit 2
fi fi
export SERVER
export FTB_DIR=$(dirname "${SERVER}") export FTB_DIR=$(dirname "${SERVER}")