]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/shader-audit.sh
Merge branch 'master' into fruitiex/runningmanctf
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
index da58f444e414ff9604e1346ad21492ba190fc920..0abbd1b0122abda9f6c109e0374fea97bc2630ac 100755 (executable)
@@ -148,9 +148,9 @@ 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%/*}
+               ## RULE: textures/FOO/* must use textures/FOO/*, for FOO in decals, liquids_water, liquids_slime, liquids_lava
+               textures/decals/*|textures/liquids_*/*|textures/effects_*/*)
+                       pre=`echo "$1" | cut -d / -f 1-2`
                        case "$2" in
                                "$pre"/*)
                                        # I _suppose_ this is fine, as tZork committed this pack
@@ -196,7 +196,7 @@ parsing_shader=
 parse_shaderstage()
 {
        while read L A1 Aother; do
-               case "$L" in
+               case "`echo "$L" | tr A-Z a-z`" in
                        map)
                                case "$A1" in
                                        '$lightmap')
@@ -224,7 +224,7 @@ parse_shader()
 {
        use_texture "$parsing_shader" "$parsing_shader" shader
        while read L A1 Aother; do
-               case "$L" in
+               case "`echo "$L" | tr A-Z a-z`" in
                        qer_editorimage)
                                use_texture "$parsing_shader" "`normalize "$A1"`" editorimage
                                ;;