diff --git a/notes/.gitignore b/notes/.gitignore new file mode 100644 index 0000000..bac46ef --- /dev/null +++ b/notes/.gitignore @@ -0,0 +1 @@ +/*.bkp \ No newline at end of file diff --git a/notes/start-script-flow.drawio.png b/notes/start-script-flow.drawio.png index 7db6894..fa8cc37 100644 Binary files a/notes/start-script-flow.drawio.png and b/notes/start-script-flow.drawio.png differ diff --git a/scripts/start-setupDatapack b/scripts/start-setupDatapack index 0755942..9690ae0 100755 --- a/scripts/start-setupDatapack +++ b/scripts/start-setupDatapack @@ -2,6 +2,8 @@ set -e -o pipefail +: "${VANILLATWEAKS_FILE:=}" +: "${VANILLATWEAKS_SHARECODE:=}" : "${REMOVE_OLD_DATAPACKS:=false}" : "${DATAPACKS_FILE:=}" : "${REMOVE_OLD_DATAPACKS_DEPTH:=1} " @@ -74,4 +76,12 @@ elif [[ "$DATAPACKS_FILE" ]]; then fi fi +if [[ ${VANILLATWEAKS_FILE} || ${VANILLATWEAKS_SHARECODE} ]]; then + mc-image-helper vanillatweaks \ + --output-directory="/data" \ + --world-subdir="${LEVEL:-world}" \ + --share-codes="$VANILLATWEAKS_SHARECODE" \ + --pack-files="$VANILLATWEAKS_FILE" +fi + exec "${SCRIPTS:-/}start-setupForgeApiMods" "$@" diff --git a/scripts/start-setupVanillaTweaks b/scripts/start-setupVanillaTweaks deleted file mode 100644 index 28b5985..0000000 --- a/scripts/start-setupVanillaTweaks +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e -o pipefail - -: "${VANILLATWEAKS_FILE:=}" -: "${VANILLATWEAKS_SHARECODE:=}" - -# shellcheck source=start-utils -. "${SCRIPTS:-/}start-utils" - -if [[ ${VANILLATWEAKS_FILE} || ${VANILLATWEAKS_SHARECODE} ]]; then - mc-image-helper vanillatweaks \ - --output-directory="/data" \ - --world-subdir="${LEVEL:-world}" \ - --share-codes="$VANILLATWEAKS_SHARECODE" \ - --pack-files="$VANILLATWEAKS_FILE" -fi - -exec "${SCRIPTS:-/}start-setupDatapack" "$@" diff --git a/scripts/start-setupWorld b/scripts/start-setupWorld index 3acce81..200d7ab 100755 --- a/scripts/start-setupWorld +++ b/scripts/start-setupWorld @@ -48,7 +48,7 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); count=$(echo "$baseDirs" | wc -l) if [[ $count -gt 1 ]]; then baseDirsNoSpigotSuffix=$(echo "$baseDirs" | sed -re 's:(_nether|_the_end)/?$::' | sort -u) - if [ $(echo "$baseDirsNoSpigotSuffix" | wc -l) -eq 1 ]; then + if [ "$(echo "$baseDirsNoSpigotSuffix" | wc -l)" -eq 1 ]; then baseDir="$baseDirsNoSpigotSuffix" baseName=$(basename "$baseDir") log "Found Spigot naming conventions, taking $baseName as main dimension" @@ -123,4 +123,4 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); fi fi -exec "${SCRIPTS:-/}start-setupVanillaTweaks" "$@" +exec "${SCRIPTS:-/}start-setupDatapack" "$@"