From: Rudolf Polzer Date: Thu, 15 Jul 2010 15:28:20 +0000 (+0200) Subject: add a simple is-there-a-shader-for-each-texture test script X-Git-Tag: xonotic-v0.1.0preview~154^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7aab99df99c4b201e1c7408147dec036b3ccbd0f;p=xonotic%2Fxonotic-maps.pk3dir.git add a simple is-there-a-shader-for-each-texture test script --- diff --git a/scripts/shader-audit.sh b/scripts/shader-audit.sh new file mode 100644 index 00000000..d5710c70 --- /dev/null +++ b/scripts/shader-audit.sh @@ -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