fix(build_image): Properly clear the EXIT trap

Now build_image will no longer claim that the build failed, prompting
you to delete the output directory, after a good build.
This commit is contained in:
Michael Marineau 2013-12-08 15:40:58 -08:00
parent 8454976f2d
commit 68221b98e6
2 changed files with 4 additions and 1 deletions

View File

@ -218,4 +218,6 @@ create_base_image() {
${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \
${image_name} --adjust_part="${FLAGS_adjust_part}" ${image_name} --adjust_part="${FLAGS_adjust_part}"
trap - EXIT
} }

View File

@ -42,10 +42,11 @@ install_dev_packages() {
info "Developer image built and stored at ${image_name}" info "Developer image built and stored at ${image_name}"
cleanup_mounts cleanup_mounts
trap - EXIT
if should_build_image ${image_name}; then if should_build_image ${image_name}; then
${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \
${image_name} --force_developer_mode --noenable_rootfs_verification ${image_name} --force_developer_mode --noenable_rootfs_verification
fi fi
trap - EXIT
} }