also allow effects_* as purpose named textures
authorRudolf Polzer <divverent@alientrap.org>
Sat, 25 Sep 2010 11:43:55 +0000 (13:43 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 25 Sep 2010 11:44:16 +0000 (13:44 +0200)
scripts/shader-audit.sh

index da58f44..46164c4 100755 (executable)
@@ -149,8 +149,8 @@ use_texture()
                        esac
                        ;;
                ## RULE: textures/FOO/* must use textures/FOO/*, for FOO in decals, liquids_water, liquids_slime, liquids_lava, warpzone
-               textures/decals/*|textures/liquids_water/*|textures/liquids_slime/*|textures/liquids_lava/*|textures/warpzone/*)
-                       pre=${1%/*}
+               textures/decals/*|textures/liquids_water/*|textures/liquids_slime/*|textures/liquids_lava/*|textures/warpzone/*|textures/effects_*)
+                       pre=`echo "$1" | cut -d / -f 1-2`
                        case "$2" in
                                "$pre"/*)
                                        # I _suppose_ this is fine, as tZork committed this pack