mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-06-27 04:24:17 +00:00
Add purpur support for ServerLibraryCleaner (#4133)
This commit is contained in:
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
||||
: "${PURPUR_BUILD:=LATEST}"
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
: "${PURPUR_CONFIG_REPO:=}"
|
||||
: "${CLEAN_SERVER_LIBRARIES:=true}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
@@ -13,10 +14,15 @@ isDebugging && set -x
|
||||
resultsFile=/data/.purpur.env
|
||||
|
||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||
if ! mc-image-helper install-purpur \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
||||
args=(
|
||||
--output-directory=/data
|
||||
--results-file="$resultsFile"
|
||||
--url="${PURPUR_DOWNLOAD_URL}"
|
||||
)
|
||||
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
logError "Failed to download from custom Purpur URL"
|
||||
exit 1
|
||||
fi
|
||||
@@ -29,6 +35,9 @@ else
|
||||
if [[ $PURPUR_BUILD ]]; then
|
||||
args+=(--build="$PURPUR_BUILD")
|
||||
fi
|
||||
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
logError "Failed to download Purpur"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user