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.
This commit is contained in:
ANAND 2020-04-24 00:20:35 +05:30
parent 8d0df46821
commit 6b33820447
No known key found for this signature in database
GPG key ID: 3AD8A3C4A51AAB97
3 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@ for f in *; do
if [ -d ${f} ]; then
# Screenshot
if [ -f ${f}/screenshot.png ]; then
cp ${f}/screenshot.png ../textures/${f}.png
cp ${f}/screenshot.png ../textures/${f}_screenshot.png
fi
# Skybox textures