]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/shader-audit.sh
shader-audit: do not complain
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
index 250e7d3ae84785e2e9bb800711fd393648ccdf01..46d92795962856bdeb03f4b558bd42f1d68134bd 100755 (executable)
@@ -157,7 +157,7 @@ use_texture()
                        sky=${1#textures/skies/}
                        sky=${sky%%_*}
                        case "$2" in
-                               "$1")
+                               textures/skies/$sky|textures/skies/$sky[_]*)
                                        # typical place for preview image
                                        ;;
                                env/$sky[/_]*)
@@ -245,7 +245,7 @@ parse_shaderfile()
        case "$1" in
                ## RULE: map_FOO.shader may define tetxures/map_FOO_* and textures/map_FOO/*
                map_*)
-                       allowed_prefixes="textures/map_`echo "$1" | cut -d _ -f 2`_ textures/map_`echo "$1" | cut -d - -f 2`/"
+                       allowed_prefixes="textures/map_`echo "$1" | cut -d _ -f 2`_ textures/map_`echo "$1" | cut -d _ -f 2`/"
                        forbidden_prefixes=
                        ;;
                ## RULE: skies_FOO.shader may define tetxures/skies/FOO and textures/skies/FOO_*
@@ -293,7 +293,7 @@ for X in *.shader; do
 done
 rm -f "$t"
 
-textures_avail=`( cd ..; find textures/ -type f -not -name '*_norm.*' -not -name '*_glow.*' -not -name '*_gloss.*' -not -name '*_reflect.*' -not -name '*_bump.*' -not -name '*.xcf' ) | while IFS= read -r T; do normalize "$T"; done | sort -u`
+textures_avail=`( cd ..; find textures/ -type f -not -name '*_norm.*' -not -name '*_glow.*' -not -name '*_gloss.*' -not -name '*_reflect.*' -not -name '*.xcf' ) | while IFS= read -r T; do normalize "$T"; done | sort -u`
 textures_used=`echo "${textures_used#$LF}" | sort -u`
 
 echo "$textures_used$LF$textures_used$LF$textures_avail" | sort | uniq -u | while IFS= read -r L; do