mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
image_to_usb: List available disks when /dev/sdX is specified
I'm lazy and sometimes copy and paste the output at the end of build_image verbatim and accidentally include the newline at the end. This gives a more useful output for that case. Change-Id: I1a4abefa884a91cb75dfe2779c79b3ef4b60e807 BUG=none TEST=./image_to_usb --from=../build/images/x86-generic/latest --to=/dev/sdX (and /dev/sde) Review URL: http://codereview.chromium.org/3212012
This commit is contained in:
parent
cc4f1dd14e
commit
b154b37ac8
@ -19,7 +19,7 @@ get_default_board
|
||||
DEFINE_string board "${DEFAULT_BOARD}" "Board for which the image was built"
|
||||
DEFINE_string from "" \
|
||||
"Directory containing chromiumos_image.bin"
|
||||
DEFINE_string to "" "${DEFAULT_TO_HELP}"
|
||||
DEFINE_string to "/dev/sdX" "${DEFAULT_TO_HELP}"
|
||||
DEFINE_boolean yes ${FLAGS_FALSE} "Answer yes to all prompts" "y"
|
||||
DEFINE_boolean force_copy ${FLAGS_FALSE} "Always rebuild test image"
|
||||
DEFINE_boolean force_non_usb ${FLAGS_FALSE} \
|
||||
@ -81,7 +81,7 @@ if [ ! -d "${FLAGS_from}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${FLAGS_to}" ]; then
|
||||
if [ "${FLAGS_to}" == "/dev/sdX" ]; then
|
||||
echo "You must specify a file or device to write to using --to."
|
||||
disks=$(list_usb_disks)
|
||||
if [ -n "$disks" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user