Commit 6fc2f40a authored by Carlo Landmeter's avatar Carlo Landmeter

abuild: add multithread decommpressing support

parent 683225c0
......@@ -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;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment