From 1fcbd8410f2ba22a850b4c96eeb1f878b5b6d9b7 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Tue, 29 Dec 2020 10:56:05 -0600 Subject: [PATCH] Allow CUSTOM_SERVER to reference not-yet-existing file from GENERIC_PACK For #703 --- start-deployCustom | 6 +++++- start-finalSetupModpack | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/start-deployCustom b/start-deployCustom index 571a5a0c..e2939ab8 100644 --- a/start-deployCustom +++ b/start-deployCustom @@ -17,12 +17,16 @@ if isURL ${CUSTOM_SERVER}; then fi elif [[ -f ${CUSTOM_SERVER} ]]; then - log "Using custom server jar at ${CUSTOM_SERVER} ..." + export SERVER=${CUSTOM_SERVER} + +elif [[ ${GENERIC_PACK} ]]; then + log "Using custom server jar from generic pack at ${CUSTOM_SERVER} ..." export SERVER=${CUSTOM_SERVER} else log "CUSTOM_SERVER is not properly set to a URL or existing jar file" exit 2 + fi export SKIP_LOG4J_CONFIG=true diff --git a/start-finalSetupModpack b/start-finalSetupModpack index 4b955e27..7e477582 100644 --- a/start-finalSetupModpack +++ b/start-finalSetupModpack @@ -153,7 +153,8 @@ if [[ "${GENERIC_PACK}" ]]; then if ! sha256sum -c ${sum_file} -s 2> /dev/null; then base_dir=/tmp/generic_pack_base mkdir -p ${base_dir} - unzip -q -d ${base_dir} ${GENERIC_PACK} + isDebugging && ls -l "${GENERIC_PACK}" + unzip -q -d ${base_dir} "${GENERIC_PACK}" if [ -f /data/manifest.txt ]; then log "Manifest exists from older generic pack, cleaning up ..." while read f; do @@ -171,7 +172,7 @@ if [[ "${GENERIC_PACK}" ]]; then for d in $(find ${base_dir} -type d); do mkdir -p "$(sed "s#${base_dir}#/data#" <<< $d)"; done for f in $(find ${base_dir} -type f); do cp -f "$f" "$(sed "s#${base_dir}#/data#" <<< $f)"; done rm -rf ${base_dir} - sha256sum ${GENERIC_PACK} > ${sum_file} + sha256sum "${GENERIC_PACK}" > ${sum_file} fi fi