-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72b6c84
commit a1f1475
Showing
3 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# Pretty much all copied from docker-minecraft-server in "start-deployPurpur" since we use a custom target to Ignite | ||
|
||
if [ "$USE_IGNITE_LOADER" = "true" ]; then | ||
echo "Setting up Ignite loader, forcing Purpur server" | ||
|
||
IFS=$'\n\t' | ||
|
||
: "${PURPUR_BUILD:=LATEST}" | ||
: "${PURPUR_DOWNLOAD_URL:=}" | ||
|
||
# shellcheck source=start-utils | ||
. "${SCRIPTS:-/}start-utils" | ||
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 | ||
log "ERROR: failed to download from custom Purpur URL" | ||
exit 1 | ||
fi | ||
# grab SERVER and export it | ||
set -a | ||
# shellcheck disable=SC1090 | ||
source "${resultsFile}" | ||
set +a | ||
|
||
else | ||
args=( | ||
--output-directory=/data | ||
--results-file="$resultsFile" | ||
--version="$VERSION" | ||
) | ||
if [[ $PURPUR_BUILD ]]; then | ||
args+=(--build="$PURPUR_BUILD") | ||
fi | ||
if ! mc-image-helper install-purpur "${args[@]}"; then | ||
log "ERROR: failed to download Purpur" | ||
exit 1 | ||
fi | ||
# grab SERVER and export it | ||
set -a | ||
# shellcheck disable=SC1090 | ||
source "${resultsFile}" | ||
set +a | ||
fi | ||
|
||
if isTrue "$USE_IGNITE_LOADER"; then | ||
downloadUrl="https://github.com/vectrix-space/ignite/releases/latest/download/ignite.jar" | ||
|
||
if ! IGNITE_JAR=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then | ||
log "ERROR: failed to download Ignite loader jar from $downloadUrl" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Normalize on Spigot for later operations | ||
export FAMILY=SPIGOT | ||
fi |