Merge pull request #143 from marineam/trap-exit

fix(build_image): Properly clear the EXIT trap
This commit is contained in:
Brandon Philips 2013-12-08 18:36:59 -08:00
commit 01215e9c1e
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
} }