mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
Only copy the final image file on local disk if it is not in the default location.
BUG=None TEST=run with a "--to" path that is the default location where the image is generated. Verify the final image is not 0 bytes. Change-Id: Ib9a7feceb17054362f00a813c369564e753cd3ab Reviewed-on: http://gerrit.chromium.org/gerrit/2988 Tested-by: Dave Parker <dparker@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Reviewed-by: Nick Sanders <nsanders@chromium.org>
This commit is contained in:
parent
c871ba2df4
commit
43395e3a70
@ -261,8 +261,10 @@ if [ -b "${FLAGS_to}" ]; then
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
# Output to a file, so just make a copy.
|
# Output to a file, so just make a copy.
|
||||||
echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..."
|
if [ "${SRC_IMAGE}" != "${FLAGS_to}" ]; then
|
||||||
${COMMON_PV_CAT} "${SRC_IMAGE}" >"${FLAGS_to}"
|
echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..."
|
||||||
|
${COMMON_PV_CAT} "${SRC_IMAGE}" >"${FLAGS_to}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Done. To copy to a USB/MMC drive, do something like:"
|
echo "Done. To copy to a USB/MMC drive, do something like:"
|
||||||
echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M oflag=sync"
|
echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M oflag=sync"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user