add .bz2 and .gz to lel-open - lel - Farbfeld image viewer
 (HTM) git clone git://git.codemadness.org/lel
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2aff7e58cc521e0110de44743b35e54cb3480b94
 (DIR) parent f5218c3944254bcfcb184de6ffff153fc4e61956
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat,  2 Aug 2014 00:33:12 +0000
       
       add .bz2 and .gz to lel-open
       
       Diffstat:
         M lel-open                            |       7 ++++++-
       
       1 file changed, 6 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/lel-open b/lel-open
       @@ -2,6 +2,7 @@
        filename="$1"
        shift
        ext=$(basename "$filename" | grep -o '\..[^\.]*$')
       +convert=""
        
        if test x"$ext" = x".jpg"; then
                convert="jpg2if"
       @@ -11,10 +12,14 @@ elif test x"$ext" = x".gif"; then
                convert="gif2if"
        elif test x"$ext" = x".if"; then
                convert="cat"
       +elif test x"$ext" = x".bz2"; then
       +        convert="bzip2 -dc"
       +elif test x"$ext" = x".gz"; then
       +        convert="gzip -dc"
        else
                echo "unknown extension \"$ext\"" >&2
        fi
        
        if test x"$convert" != x""; then
       -        "$convert" < "$filename" | lel -t "$filename" "$@"
       +        $convert < "$filename" | lel -t "$filename" "$@"
        fi