mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-03-20 05:25:58 +00:00
Added arclight and nanolimbo types and Meowice flags (#3485)
This commit is contained in:
41
scripts/start-deployArcLight
Executable file
41
scripts/start-deployArcLight
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
resolveVersion
|
||||
: "${ARCLIGHT_RELEASE:=latest}"
|
||||
: "${ARCLIGHT_TYPE:=neoforge}"
|
||||
|
||||
arclightReleasesUrl=https://api.github.com/repos/IzzelAliz/Arclight/releases
|
||||
if [[ ${ARCLIGHT_RELEASE^^} = LATEST ]]; then
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/latest
|
||||
else
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/tags/${ARCLIGHT_RELEASE}
|
||||
fi
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$arclightReleaseUrl"); then
|
||||
logError "Failed to access ${ARCLIGHT_RELEASE} release of Arclight"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
logError "Failed to locate Arclight jar for $VERSION from ${ARCLIGHT_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Arclight from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
logError "Arclight jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
Reference in New Issue
Block a user