diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-04-11 21:39:49 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-04-15 18:33:57 +0000 |
commit | 6fc2f40a0da60f076a4b1981832221f57ab2669c (patch) | |
tree | 6436796e3c5c9b27a971e30bc554a0c822709a68 | |
parent | 683225c0640ed9da3727be6ed3831860e7b56f6d (diff) | |
download | abuild-6fc2f40a0da60f076a4b1981832221f57ab2669c.tar.gz abuild-6fc2f40a0da60f076a4b1981832221f57ab2669c.tar.bz2 abuild-6fc2f40a0da60f076a4b1981832221f57ab2669c.tar.xz abuild-6fc2f40a0da60f076a4b1981832221f57ab2669c.zip |
abuild: add multithread decommpressing support
-rw-r--r-- | abuild.in | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -426,6 +426,8 @@ default_unpack() { verify || return 1 initdcheck || return 1 mkdir -p "$srcdir" + local gunzip=$(command -v pigz || echo gunzip) + [ $gunzip = "/usr/bin/pigz" ] && gunzip="$gunzip -d" for u in $source; do local s if is_remote "$u"; then @@ -439,7 +441,7 @@ default_unpack() { tar -C "$srcdir" -xf "$s" || return 1;; *.tar.gz|*.tgz) msg "Unpacking $s..." - tar -C "$srcdir" -zxf "$s" || return 1;; + $gunzip -c "$s" | tar -C "$srcdir" -x || return 1;; *.tar.bz2) msg "Unpacking $s..." tar -C "$srcdir" -jxf "$s" || return 1;; @@ -448,11 +450,11 @@ default_unpack() { tar -C "$srcdir" --lzip -xf "$s" || return 1;; *.tar.lzma) msg "Unpacking $s..." - unlzma -c "$s" | tar -C "$srcdir" -x \ + unlzma -T 0 -c "$s" | tar -C "$srcdir" -x \ || return 1;; *.tar.xz) msg "Unpacking $s..." - unxz -c "$s" | tar -C "$srcdir" -x || return 1;; + unxz -T 0 -c "$s" | tar -C "$srcdir" -x || return 1;; *.zip) msg "Unpacking $s..." unzip -n -q "$s" -d "$srcdir" || return 1;; |