
This change adds an echo statement to log the file path of the generated ZIP file. It helps clarify where the resource pack is being written for better debugging and visibility.
30 lines
No EOL
747 B
Bash
Executable file
30 lines
No EOL
747 B
Bash
Executable file
#/usr/bin/env bash
|
|
|
|
DIR=$(realpath $(dirname $0))
|
|
|
|
script_name=$1
|
|
shift
|
|
|
|
if [[ -e /.dockerenv ]]; then
|
|
root_dir="/scripts"
|
|
else
|
|
root_dir="/pelican/data/botc"
|
|
fi
|
|
|
|
if [[ "${script_name}x" != "x" ]]; then
|
|
script_file="${root_dir}/${script_name}.png"
|
|
else
|
|
script_file="${DIR}/templates/map_background.png"
|
|
fi
|
|
|
|
# Instantiate template
|
|
map_file="${DIR}/templates/texture-pack/assets/minecraft/textures/map/map_background.png"
|
|
rm ${map_file}
|
|
cp ${script_file} ${map_file}
|
|
# Package resource pack
|
|
pushd "${DIR}/templates"
|
|
mkdir -p "${root_dir}/files"
|
|
rm "${root_dir}/files/botc-script-resource-pack.zip"
|
|
zip -r "${root_dir}/files/botc-script-resource-pack.zip" texture-pack
|
|
echo "Writing to \"${root_dir}/files/botc-script-resource-pack.zip\""
|
|
popd |