From 92740bd66195887f079ce92865bcfa52b9384360 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 1 Jul 2011 00:58:52 +0200 Subject: [PATCH] xbps-src [extract]: use decompress utils and pipe to tar(1). --- xbps-src/shutils/extract_funcs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xbps-src/shutils/extract_funcs.sh b/xbps-src/shutils/extract_funcs.sh index fa58649c5b..219765d46b 100644 --- a/xbps-src/shutils/extract_funcs.sh +++ b/xbps-src/shutils/extract_funcs.sh @@ -111,22 +111,22 @@ extract_distfiles() case ${cursufx} in txz) - if ! command -v xz 2>&1 >/dev/null; then + if ! command -v unxz 2>&1 >/dev/null; then msg_error "cannot find xz for extraction.\n" fi - tar xfJ $XBPS_SRCDISTDIR/$curfile -C $extractdir + unxz -cf $XBPS_SRCDISTDIR/$curfile | tar xf - -C $extractdir if [ $? -ne 0 ]; then msg_error "extracting $curfile into $XBPS_BUILDDIR.\n" fi ;; tbz) - tar xfj $XBPS_SRCDISTDIR/$curfile -C $extractdir + bunzip2 -cf $XBPS_SRCDISTDIR/$curfile | tar xf - -C $extractdir if [ $? -ne 0 ]; then msg_error "extracting $curfile into $XBPS_BUILDDIR.\n" fi ;; tgz) - tar xfz $XBPS_SRCDISTDIR/$curfile -C $extractdir + gunzip -cf $XBPS_SRCDISTDIR/$curfile | tar xf - -C $extractdir if [ $? -ne 0 ]; then msg_error "extracting $curfile into $XBPS_BUILDDIR.\n" fi