From 7aab99df99c4b201e1c7408147dec036b3ccbd0f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 15 Jul 2010 17:28:20 +0200 Subject: [PATCH] add a simple is-there-a-shader-for-each-texture test script --- scripts/shader-audit.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/shader-audit.sh 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 -- 2.39.2