From 0a662248ad9cc9e79c13648ab6e18ca2b04b1df7 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Tue, 15 Dec 2020 15:58:47 -0500 Subject: [PATCH] Fix make update-examples. The existing script had some limitations: - It expected a certain level of nesting, and failed for tests/test_scenes/material_cycle/material_spatial/ due to the extra level of nesting - It only copied `.escn` files, but we actually need to make sure other files (like `.png` textures) are produced - It would not clean up files left behind from prior runs. For example, if an update failed to produce a `.png`, but we had it left from the prior run, we wouldn't notice. The `rm`/`cp` approach is simpler and solves these problems. --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6fc38b1..8f00495 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,8 @@ test-import: export-blends update-examples: - mkdir -p tests/reference_exports - find tests/godot_project/exports/ -name *.escn | while read f; \ - do \ - mkdir -p "tests/reference_exports/$$(echo $$f | cut -d/ -f4)"; \ - cp "$$f" "tests/reference_exports/$$(echo $$f | cut -d/ -f4-)"; \ - done; + rm -r tests/reference_exports/* + cp -r tests/godot_project/exports/* tests/reference_exports/ compare: export-blends diff -x "*.escn.import" -rq tests/godot_project/exports/ tests/reference_exports/