]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blob - scripts/shader-audit.sh
d5710c7083d2612981857737944089da3325f3ee
[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