capturetheflag/setup_maps.sh
ANAND 6b33820447
setup_maps.sh: Improve renaming of maps' screenshot textures
Screenshot textures would be renamed to "<mapname>_screenshot.png", making it explicit that this texture is a screenshot texture.

This fixes a potential bug wherein the screenshot texture could unintentionally override other textures if the map's name matches the texture name. e.g. moon.png - this would now be renamed to moon_screenshot.png.
2020-04-24 00:45:29 +05:30

22 lines
647 B
Bash
Executable file

cd mods/ctf/ctf_map/ctf_map_core/maps/
# Copy textures from map sub-dirs to ctf_map_core/textures
for f in *; do
if [ -d ${f} ]; then
# Screenshot
if [ -f ${f}/screenshot.png ]; then
cp ${f}/screenshot.png ../textures/${f}_screenshot.png
fi
# Skybox textures
if [ -f ${f}/skybox_1.png ]; then
cp ${f}/skybox_1.png ../textures/${f}_skybox_1.png
cp ${f}/skybox_2.png ../textures/${f}_skybox_2.png
cp ${f}/skybox_3.png ../textures/${f}_skybox_3.png
cp ${f}/skybox_4.png ../textures/${f}_skybox_4.png
cp ${f}/skybox_5.png ../textures/${f}_skybox_5.png
cp ${f}/skybox_6.png ../textures/${f}_skybox_6.png
fi
fi
done