shader_audit: allow textures/map_*/*
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 11:35:20 +0000 (13:35 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 11:35:20 +0000 (13:35 +0200)
scripts/shader-audit.sh

index 9b5d9d94f7ee707dd14993ba7ecadb1704d756a0..f0f95b50337f30a9344ef2854d38c9aef1c9e04d 100644 (file)
@@ -55,6 +55,17 @@ use_texture()
                                        ;;
                        esac
                        ;;
+               textures/map_*/*)
+                       pre=${1%%/map_*}
+                       suf=${1#*/map_}
+                       case "$2" in
+                               "$pre"/map/*)
+                                       ;;
+                               *)
+                                       echo "(EE) texture $2 of shader $1 is out of place, recommended file name is $pre/map_$suf"
+                                       ;;
+                       esac
+                       ;;
                textures/common/*)
                        case "$2" in
                                "$1")
@@ -168,6 +179,8 @@ echo "$textures_used$LF$textures_used$LF$textures_avail" | sort | uniq -u | whil
        case "$L" in
                textures/radiant/*)
                        ;;
+               textures/map_*/*)
+                       ;;
                *)
                        echo "(EE) texture $L is not referenced by any shader"
                        ;;