From 29b7081dcf469e68c88dfe4a05d22e9f0fadac71 Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Fri, 25 Jan 2013 10:32:28 +0100 Subject: [PATCH] X11rdp: Handle more compression formats Add .xz and plain .tar files. --- xorg/X11R7.6/buildx.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xorg/X11R7.6/buildx.sh b/xorg/X11R7.6/buildx.sh index 3bf17b42..f3b231e3 100755 --- a/xorg/X11R7.6/buildx.sh +++ b/xorg/X11R7.6/buildx.sh @@ -123,13 +123,15 @@ extract_it() # if pkg has not yet been extracted, do so now if [ ! -d $mod_name ]; then - if echo $mod_file | grep -q tar.bz2 + case "$mod_file" in + *.tar.bz2) comp=j ;; + *.tar.gz) comp=z ;; + *.tar.xz) comp=J ;; + *.tar) comp= ;; + *) echo "unknown compressed module $mod_name" ; exit 1 ;; + esac + if ! tar x${comp}f ../downloads/$mod_file > /dev/null then - tar xjf ../downloads/$mod_file > /dev/null 2>&1 - else - tar xzf ../downloads/$mod_file > /dev/null 2>&1 - fi - if [ $? -ne 0 ]; then echo "error extracting module $mod_name" exit 1 fi