Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1565)

Unified Diff: src/scripts/mod_image_for_test.sh

Issue 1567013: Clean up temporary files and directories left by build_image, etc. (Closed)
Patch Set: Emit scripts to pack/unpack the image. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/scripts/emit_gpt_scripts.sh ('K') | « src/scripts/image_to_usb.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/mod_image_for_test.sh
diff --git a/src/scripts/mod_image_for_test.sh b/src/scripts/mod_image_for_test.sh
index c38fc92117342153e6e099b380fc304177b735ee..8d778e9d2f636018e39b15588eaf34faf0c19e82 100755
--- a/src/scripts/mod_image_for_test.sh
+++ b/src/scripts/mod_image_for_test.sh
@@ -75,6 +75,8 @@ cleanup() {
cleanup_rootfs_loop
fi
+ rmdir "${ROOT_FS_DIR}"
+
# Turn die on error back on.
set -e
}
@@ -94,11 +96,12 @@ else
fi
set -e
-trap cleanup EXIT
ROOT_FS_DIR=$(dirname "${FLAGS_image}")/rootfs
mkdir -p "${ROOT_FS_DIR}"
+trap cleanup EXIT
+
# Figure out how to loop mount the rootfs partition. It should be partition 3
# on the disk image.
offset=$(partoffset "${FLAGS_image}" 3)
« src/scripts/emit_gpt_scripts.sh ('K') | « src/scripts/image_to_usb.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698