OSDN Git Service

fix decompression
authorRudolf Polzer <divverent@xonotic.org>
Fri, 15 Jul 2011 07:08:18 +0000 (09:08 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 15 Jul 2011 07:08:18 +0000 (09:08 +0200)
tests/test.sh

index 02027c5..5e75307 100644 (file)
@@ -86,14 +86,21 @@ html_rowstart()
 
 decompress()
 {
-       if $use_libtxc_dxtn; then
-               LD_PRELOAD=/usr/lib/libtxc_dxtn.so bin/s2tc_decompress < "$1"
-       elif use_nvcompress; then
-               nvdecompress "$1"
-       else
-               # this has bugs with alpha channels
-               convert "$1" TGA:-
-       fi
+       case "$1" in
+               *.dds)
+                       if $use_libtxc_dxtn; then
+                               LD_PRELOAD=/usr/lib/libtxc_dxtn.so bin/s2tc_decompress < "$1"
+                       elif use_nvcompress; then
+                               nvdecompress "$1"
+                       else
+                               # this has bugs with alpha channels
+                               convert "$1" TGA:-
+                       fi
+                       ;;
+               *)
+                       cat "$1"
+                       ;;
+       esac
 }
 
 html()