瀏覽代碼

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 年之前
父節點
當前提交
70df7d8a1b
共有 1 個文件被更改,包括 5 次插入1 次删除
  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/