mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Use pbzip2 in archive_build, if it is available.
BUG=chromium-os:16502 TEST=Run cbuildbot run of archive stage with official build. Change-Id: I03898404dd27d6930c4a01bd9826796ddb07a4cd Reviewed-on: http://gerrit.chromium.org/gerrit/5445 Reviewed-by: Zdenek Behan <zbehan@chromium.org> Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
46657a3d09
commit
27064994fa
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user