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

Unified Diff: bin/cros_make_image_bootable

Issue 3569015: Add defaults for cros_make_image_bootable. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Ws Created 10 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_make_image_bootable
diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable
index 20c21911d66bc4330e17083e44ebc4fda562dc6d..3ea148145fd8d8e73c9e7633e9ce4de094aa540a 100755
--- a/bin/cros_make_image_bootable
+++ b/bin/cros_make_image_bootable
@@ -28,8 +28,9 @@ if [ $# -lt 2 ]; then
exit 1
fi
-BOOT_DESC_FILE="${1}/boot.desc"
-IMAGE="${1}/${2}"
+IMAGE_DIR="$(readlink -f "${1}")"
+BOOT_DESC_FILE="${IMAGE_DIR}/boot.desc"
+IMAGE="${IMAGE_DIR}/${2}"
shift
shift
FLAG_OVERRIDES="${@}"
@@ -233,6 +234,16 @@ make_image_bootable() {
-s "${FLAGS_statefulfs_mountpoint}"
}
+# Use default of current image location if the output dir doesn't exist.
+if [ ! -d ${FLAGS_output_dir} ]; then
+ warn "Output dir not found, using ${IMAGE_DIR}."
+ FLAGS_output_dir="${IMAGE_DIR}"
+ FLAGS_rootfs_hash="${IMAGE_DIR}/rootfs.hash"
+ FLAGS_rootfs_mountpoint="${IMAGE_DIR}/rootfs_dir"
+ FLAGS_statefulfs_mountpoint="${IMAGE_DIR}/stateful_dir"
+ FLAGS_espfs_mountpoint="${IMAGE_DIR}/esp"
+fi
+
# Create the directories if they don't exist.
mkdir -p ${FLAGS_rootfs_mountpoint}
mkdir -p ${FLAGS_statefulfs_mountpoint}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698