From fb2ce5c4e3a414e7ea1fee322df5bc8656c84cba Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 15 Jul 2011 09:08:18 +0200 Subject: [PATCH] fix decompression --- tests/test.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/test.sh b/tests/test.sh index 02027c5..5e75307 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -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() -- 2.11.0