diff --git a/archive_build.sh b/archive_build.sh index e04f915f1a..9e1b0bec82 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -161,7 +161,12 @@ if [ $FLAGS_test_mod -eq $FLAGS_TRUE ]; then pushd "${FLAGS_chroot}/build/${FLAGS_board}/usr/local" echo "Archiving autotest build artifacts" - tar cjf "${FLAGS_from}/autotest.tar.bz2" --checkpoint=1000 autotest + if which pbzip2 >/dev/null 2>/dev/null; then + TAR_BZIP2="tar --use-compress-program=pbzip2" + else + TAR_BZIP2="tar --bzip2" + fi + ${TAR_BZIP2} -cf "${FLAGS_from}/autotest.tar.bz2" --checkpoint=10000 autotest popd fi diff --git a/archive_hwqual b/archive_hwqual index 27d1b38046..6fa7498342 100755 --- a/archive_hwqual +++ b/archive_hwqual @@ -72,8 +72,14 @@ function main() { mkdir -p image mkdir -p "tarball/${FLAGS_output_tag}" + if which pbzip2 >/dev/null 2>/dev/null; then + TAR_BZIP2="tar --use-compress-program=pbzip2" + else + TAR_BZIP2="tar --bzip2" + fi + echo "Extracting autotest from build artifacts..." - tar --bzip2 -xf autotest.tar.bz2 + ${TAR_BZIP2} -xf autotest.tar.bz2 cd "${TMP}" @@ -104,7 +110,7 @@ function main() { echo "Creating ${FLAGS_to}/${FLAGS_output_tag}.tar.bz2..." mkdir -p "${FLAGS_to}" cd tarball - tar --bzip2 -cf "${FLAGS_to}/${FLAGS_output_tag}.tar.bz2" . + ${TAR_BZIP2} -cf "${FLAGS_to}/${FLAGS_output_tag}.tar.bz2" . trap - EXIT cleanup