[mc] glob for forge jar, but exclude installer

This commit is contained in:
Geoff Bourne 2017-06-06 23:09:45 -05:00
parent 24c68b9c2c
commit e6ca9a1c6d

View File

@ -211,9 +211,17 @@ function installForge {
fi
# NOTE $shortForgeVersion will be empty if installer location was given to us
forgeJars=$(ls *forge*$shortForgeVersion*.jar)
SERVER=${forgeJars/$FORGE_INSTALLER/}
if [ -z $SERVER ]; then
for j in *forge*.jar; do
case $j in
*installer*)
;;
*)
SERVER=$j
break
;;
esac
done
if [[ -z $SERVER ]]; then
echo "Unable to derive server jar for Forge"
exit 2
fi