Merge branch 'master' of ssh://git.xonotic.org/xonotic-maps.pk3dir
authorRudolf Polzer <divverent@alientrap.org>
Thu, 15 Jul 2010 15:29:00 +0000 (17:29 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 15 Jul 2010 15:29:00 +0000 (17:29 +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