diff --git a/Dockerfile b/Dockerfile index f2a58c12..f513ee51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/start-deployFabric b/start-deployFabric index 97fa7be0..5fce8d46 100755 --- a/start-deployFabric +++ b/start-deployFabric @@ -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 "$@" diff --git a/start-setupModpack b/start-setupModpack index 92cb9811..56bea8ed 100755 --- a/start-setupModpack +++ b/start-setupModpack @@ -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 ..."