botc-mc-scripts/load-script.sh
2025-06-02 21:12:45 +01:00

22 lines
No EOL
543 B
Bash

#/usr/bin/env bash
DIR=$(realpath $(dirname $0))
directory=$1
shift
script_name=$1
shift
if [[ "${script_name}x" != "x" ]]; then
script_file="${directory}/${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
rm ${SERVER_DIR}/botc-script-resource-pack.zip
zip -r ${SERVER_DIR}/botc-script-resource-pack.zip templates/texture-pack