mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 05:51:43 +01:00
fix(build_image): Add auto-enter-chroot call
This makes build_image and image_to_vm behave like build_packages, where if you call the script outside of the SDK's chroot it will automatically reexecute itself inside of the chroot.
This commit is contained in:
parent
0a8f178002
commit
934675d19b
@ -12,6 +12,11 @@
|
||||
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
|
||||
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
||||
|
||||
# Script must run inside the chroot
|
||||
restart_in_chroot_if_needed "$@"
|
||||
|
||||
assert_not_root_user
|
||||
|
||||
# Developer-visible flags.
|
||||
DEFINE_string board "${DEFAULT_BOARD}" \
|
||||
"The board to build an image for."
|
||||
|
||||
@ -8,10 +8,15 @@
|
||||
# disk image, supporting a variety of different targets.
|
||||
|
||||
|
||||
|
||||
# Helper scripts should be run from the same location as this script.
|
||||
SCRIPT_ROOT=$(dirname "$(readlink -f "$0")")
|
||||
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
||||
|
||||
# Script must run inside the chroot
|
||||
restart_in_chroot_if_needed "$@"
|
||||
|
||||
assert_not_root_user
|
||||
|
||||
. "${BUILD_LIBRARY_DIR}/toolchain_util.sh" || exit 1
|
||||
. "${BUILD_LIBRARY_DIR}/build_image_util.sh" || exit 1
|
||||
. "${BUILD_LIBRARY_DIR}/vm_image_util.sh" || exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user