mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
Temporarily reinstate support for --to=/dev/sdX
This is part of some user's workflow and should be deprecated with proper advance notice. - Added a deprecation warning when --to=/dev/sdX is used in image_to_usb.sh. - Removed mention of /dev/sdX from the output of build_image. Also simplified this output a bit (it should be obvious to a user who just invoked build_image that the other scripts should be invoked similarly, from inside the chroot's scripts directory). BUG=chromium-os:32023 TEST=Invoked image_to_usb.sh with different --to values Change-Id: Ib93d1b55f425b0978c4a9680be7755ae031c46e6 Reviewed-on: https://gerrit.chromium.org/gerrit/25819 Reviewed-by: Olof Johansson <olofj@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Ready: Gilad Arnold <garnold@chromium.org>
This commit is contained in:
parent
f5a383d366
commit
a7536efa24
11
build_image
11
build_image
@ -282,8 +282,9 @@ fi
|
||||
|
||||
print_time_elapsed
|
||||
|
||||
echo "To copy to USB keyfob, do something like:"
|
||||
echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
|
||||
echo "To convert to VMWare image, INSIDE the chroot, do something like:"
|
||||
echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
|
||||
echo "from the scripts directory where you entered the chroot."
|
||||
cat << EOF
|
||||
To copy the image to a USB key, use:
|
||||
./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR}
|
||||
To convert it to a VMWare image, use:
|
||||
./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}
|
||||
EOF
|
||||
|
@ -145,6 +145,15 @@ if [ ! -d "${FLAGS_from}" ] ; then
|
||||
die_notrace "Cannot find image directory ${FLAGS_from}"
|
||||
fi
|
||||
|
||||
# TODO(garnold) This code reinstates the previous default value for --to, which
|
||||
# some users relied upon to trigger target device auto-detection. It should be
|
||||
# removed once we're sure that all users have adapted to simply not specifying
|
||||
# --to. The instructions emitted by build_image were changed accordingly.
|
||||
if [ "${FLAGS_to}" == "/dev/sdX" ]; then
|
||||
warn "the use of --to=/dev/sdX is deprecated, just omit --to instead"
|
||||
FLAGS_to=""
|
||||
fi
|
||||
|
||||
# No target provided, attempt autodetection.
|
||||
if [ -z "${FLAGS_to}" ]; then
|
||||
if [ ${FLAGS_yes} -eq ${FLAGS_TRUE} ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user