Browse Source

Update `make update-examples` to handle nested directories (#382)

Since the tests were nested, `make update-examples` no longer worked.
This updates the make rule to handle the nested directories.
Ryan Roden-Corrent 4 years ago
parent
commit
70df7d8a1b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Makefile

+ 5 - 1
Makefile

@@ -26,7 +26,11 @@ test-import: export-blends
 
 update-examples:
 	mkdir -p tests/reference_exports
-	cp tests/godot_project/exports/*.escn 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;
 
 compare: export-blends
 	diff -x "*.escn.import" -r tests/godot_project/exports/ tests/reference_exports/