From 28a9444ecb4e0ba592c6794a0716644cc307a64b Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Sun, 8 Dec 2019 02:07:25 +0100 Subject: [PATCH] setup_maps.sh: Fix "No such file" errors (#522) --- setup_maps.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setup_maps.sh b/setup_maps.sh index f205e23..1322c95 100755 --- a/setup_maps.sh +++ b/setup_maps.sh @@ -4,14 +4,18 @@ cd mods/ctf/ctf_map/ctf_map_core/maps/ for f in *; do if [ -d ${f} ]; then # Screenshot - cp ${f}/screenshot.png ../textures/${f}.png + if [ -f ${f}/screenshot.png ]; then + cp ${f}/screenshot.png ../textures/${f}.png + fi # Skybox textures - 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 + 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