]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blob - scripts/shader-audit.sh
add a simple is-there-a-shader-for-each-texture test script
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
1 #!/bin/sh
2
3 ( cd ../textures; find */ -type f -not -name '*_norm.*' -not -name '*_glow.*' -not -name '*_gloss.*' -print ) | while IFS= read -r TEX; do
4         TEX=${TEX%.*}
5         # does it have a shader?
6         if ! grep -Ei '^[[:space:]]*((animmap|map|qer_editorimage)[[:space:]]+)?"?textures/'"$TEX"'(\.tga)?"?[[:space:]]*(//.*)?$' *.shader >/dev/null; then
7                 echo "No shader defined using $TEX, please add one"
8         fi
9 done