Fixed support for modpacks that has multiple forge jars

HR New Beginnings was one such modpack
This commit is contained in:
Geoff Bourne
2020-04-10 10:59:07 -05:00
parent 29eda3530c
commit 8440e57118

View File

@@ -76,7 +76,9 @@ fi
if [[ $(find ${FTB_BASE_DIR} $entryScriptExpr | wc -l) = 0 ]]; then
forgeJar=$(find ${FTB_BASE_DIR} -name 'forge*.jar' -a -not -name 'forge*installer')
# Allow up to 2 levels since some modpacks have a top-level directory named
# for the modpack
forgeJar=$(find ${FTB_BASE_DIR} -maxdepth 2 -name 'forge*.jar' -a -not -name 'forge*installer')
if [[ "$forgeJar" ]]; then
export FTB_BASE_DIR=$(dirname "${forgeJar}")
log "No entry script found, so building one for ${forgeJar}"