summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6/buildx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/X11R7.6/buildx.sh')
-rwxr-xr-xxorg/X11R7.6/buildx.sh14
1 files 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