mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Fix clean_loopback_devices to actually parse board parameter
clean_loopback_devices was never parsing command line arguments or properly setting the default board. As such it would always use the x86-wayland overlay as it came last alphabetically in the directory listing. BUG=chromium-os:22671 TEST=Ran clean_loopback_devices with various --board arguments Validated correct OUTPUT_DIR values for those, including an error and abort on null Change-Id: Ia8826bbeb88ed5bdac0aa7698dd262f72de2749a Reviewed-on: https://gerrit.chromium.org/gerrit/11332 Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Ready: Jon Kliegman <kliegs@chromium.org> Tested-by: Jon Kliegman <kliegs@chromium.org>
This commit is contained in:
parent
07d2422c91
commit
e6932d8986
@ -32,11 +32,22 @@ find_common_sh
|
||||
# Script must be run inside the chroot.
|
||||
assert_inside_chroot
|
||||
|
||||
get_default_board
|
||||
|
||||
DEFINE_string output_root "$DEFAULT_BUILD_ROOT/images" \
|
||||
"Directory in which to place image result directories (named by version)"
|
||||
DEFINE_string board "$DEFAULT_BOARD" \
|
||||
"The board to build an image for."
|
||||
|
||||
# Parse command line.
|
||||
FLAGS "$@" || exit 1
|
||||
eval set -- "${FLAGS_ARGV}"
|
||||
|
||||
if [[ -z "${FLAGS_board}" ]]; then
|
||||
error "--board is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}"
|
||||
|
||||
echo "This will unmount any directory under $OUTPUT_DIR:"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user