mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-03-05 07:37:19 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
250ce7849b
4 changed files with 13 additions and 22 deletions
|
@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.4.0
|
||||
ARG MC_HELPER_VERSION=1.5.2
|
||||
RUN curl -fsSL https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
||||
|
|
|
@ -58,7 +58,7 @@ if [[ ! -e ${SERVER} ]]; then
|
|||
exit 10
|
||||
fi
|
||||
|
||||
mv fabric-server-launch.jar ${SERVER}
|
||||
mv fabric-server-launch.jar "${SERVER}"
|
||||
fi
|
||||
|
||||
exec ${SCRIPTS:-/}start-setupWorld $@
|
||||
exec ${SCRIPTS:-/}start-setupWorld "$@"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
set -e -o pipefail
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
if isDebugging; then
|
||||
set -x
|
||||
|
@ -71,25 +72,11 @@ if [[ "$MODS" ]]; then
|
|||
|
||||
for i in ${MODS//,/ }
|
||||
do
|
||||
if isURL $i; then
|
||||
if isURL "$i"; then
|
||||
log "Downloading mod/plugin $i ..."
|
||||
if isValidFileURL jar "$i"; then
|
||||
if ! curl -fsSL -o "${out_dir}/$(getFilenameFromUrl "${i}")" "${i}"; then
|
||||
log "ERROR: failed to download from $i into $out_dir"
|
||||
exit 2
|
||||
fi
|
||||
else
|
||||
effective_url=$(resolveEffectiveUrl "$i")
|
||||
if isValidFileURL jar "${effective_url}"; then
|
||||
out_file=$(getFilenameFromUrl "${effective_url}")
|
||||
if ! curl -fsSL -o "${out_dir}/$out_file" "${effective_url}"; then
|
||||
log "ERROR: failed to download from $i into $out_dir"
|
||||
exit 2
|
||||
fi
|
||||
else
|
||||
log "ERROR: $effective_url resolved from $i is not a valid jar URL"
|
||||
exit 2
|
||||
fi
|
||||
if ! get -o "${out_dir}" "$i"; then
|
||||
log "ERROR: failed to download from $i into $out_dir"
|
||||
exit 2
|
||||
fi
|
||||
elif [[ -f "$i" && "$i" =~ .*\.jar ]]; then
|
||||
log "Copying plugin located at $i ..."
|
||||
|
|
|
@ -182,5 +182,9 @@ function removeOldMods {
|
|||
}
|
||||
|
||||
function get() {
|
||||
mc-image-helper get "$@"
|
||||
local flags=()
|
||||
if isDebugging; then
|
||||
flags+=("--debug")
|
||||
fi
|
||||
mc-image-helper "${flags[@]}" get "$@"
|
||||
}
|
Loading…
Add table
Reference in a new issue