]> git.rm.cloudns.org Git - xonotic/xonotic-maps.pk3dir.git/commitdiff
add a simple is-there-a-shader-for-each-texture test script
authorRudolf Polzer <divverent@alientrap.org>
Thu, 15 Jul 2010 15:28:20 +0000 (17:28 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 15 Jul 2010 15:28:20 +0000 (17:28 +0200)
scripts/shader-audit.sh [new file with mode: 0644]

diff --git a/scripts/shader-audit.sh b/scripts/shader-audit.sh
new file mode 100644 (file)
index 0000000..d5710c7
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+( cd ../textures; find */ -type f -not -name '*_norm.*' -not -name '*_glow.*' -not -name '*_gloss.*' -print ) | while IFS= read -r TEX; do
+       TEX=${TEX%.*}
+       # does it have a shader?
+       if ! grep -Ei '^[[:space:]]*((animmap|map|qer_editorimage)[[:space:]]+)?"?textures/'"$TEX"'(\.tga)?"?[[:space:]]*(//.*)?$' *.shader >/dev/null; then
+               echo "No shader defined using $TEX, please add one"
+       fi
+done