fix mcjar
This commit is contained in:
parent
04b1b8d4fc
commit
1b2c9f973c
1 changed files with 9 additions and 4 deletions
|
@ -227,9 +227,11 @@ forge() {
|
|||
|
||||
log "Using forge promotions slim json"
|
||||
|
||||
name=""
|
||||
url=""
|
||||
|
||||
get_forge_url() {
|
||||
local url
|
||||
url="https://maven.minecraftforge.net/net/minecraftforge/forge/$1/forge-$1-installer.jar"
|
||||
code=0
|
||||
wget -q --spider "$url" || code=$?
|
||||
|
@ -272,13 +274,16 @@ forge() {
|
|||
search_for_url() {
|
||||
log "Searching for forge URL"
|
||||
log "Trying MC_VERSION-FORGE_VERSION"
|
||||
ver=$(get_forge_url "$MC_VERSION-$FORGE_VERSION")
|
||||
name="$MC_VERSION-$FORGE_VERSION"
|
||||
ver=$(get_forge_url "$name")
|
||||
if [ "$ver" != "" ]; then url="$ver"; return 0; fi
|
||||
log "Trying MC_VERSION-FORGE_VERSION-MC_VERSION"
|
||||
ver=$(get_forge_url "$MC_VERSION-$FORGE_VERSION-$MC_VERSION")
|
||||
name="$MC_VERSION-$FORGE_VERSION-$MC_VERSION"
|
||||
ver=$(get_forge_url "$name")
|
||||
if [ "$ver" != "" ]; then url="$ver"; return 0; fi
|
||||
log "Trying MC_VERSION-FORGE_VERSION-mc172"
|
||||
ver=$(get_forge_url "$MC_VERSION-$FORGE_VERSION-mc172")
|
||||
name="$MC_VERSION-$FORGE_VERSION-mc172"
|
||||
ver=$(get_forge_url "$name")
|
||||
if [ "$ver" != "" ]; then url="$ver"; return 0; fi
|
||||
error "Invalid VERSION: $MC_VERSION-$FORGE_VERSION"
|
||||
}
|
||||
|
@ -288,7 +293,7 @@ forge() {
|
|||
search_for_url
|
||||
|
||||
if [ $ALL -eq 1 ]; then
|
||||
echo "JAR_NAME=forge-$MC_VERSION-$FORGE_VERSION-installer.jar"
|
||||
echo "JAR_NAME=forge-$name-installer.jar"
|
||||
echo "JAR_URL=$url"
|
||||
echo "MC_TYPE=$MC_TYPE"
|
||||
echo "MC_VERSION=$MC_VERSION"
|
||||
|
|
Loading…
Reference in a new issue