Ferrochrome: Extracting image while downloading
This would save some disk spaces (1.6G).
Bug: 346754093
Test: ferrochrome.sh
Change-Id: I9b74e6c874ab992451bfeea173bad97161026e5f
diff --git a/tests/ferrochrome/ferrochrome.sh b/tests/ferrochrome/ferrochrome.sh
index 5638b34..92702ee 100755
--- a/tests/ferrochrome/ferrochrome.sh
+++ b/tests/ferrochrome/ferrochrome.sh
@@ -100,13 +100,9 @@
# DISCLAIMER: Image is too large (1.5G+ for compressed, 6.5G+ for uncompressed), so can't submit.
fecr_dir=$(mktemp -d)
- echo "Downloading ferrochrome image to ${fecr_dir}"
+ echo "Downloading & extracting ferrochrome image to ${fecr_dir}"
fecr_version=${fecr_version:-${FECR_DEFAULT_VERSION}}
- curl --output-dir ${fecr_dir} -O ${FECR_GS_URL}/${fecr_version}/chromiumos_test_image.tar.xz
- fi
- if [[ ! -f "${fecr_dir}/chromiumos_test_image.bin" ]]; then
- echo "Extrating ferrochrome image"
- tar xvf ${fecr_dir}/chromiumos_test_image.tar.xz -C ${fecr_dir} > /dev/null
+ curl ${FECR_GS_URL}/${fecr_version}/chromiumos_test_image.tar.xz | tar xfJ - -C ${fecr_dir}
fi
echo "Pushing ferrochrome image to ${FECR_DEVICE_DIR}"