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

Unified Diff: mk_memento_images.sh

Issue 4825004: crosutils: move image_common.sh to lib/cros_image_common.sh (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years, 1 month 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
« make_factory_package.sh ('K') | « make_factory_package.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mk_memento_images.sh
diff --git a/mk_memento_images.sh b/mk_memento_images.sh
index b5d786135c2ed6dad11e24bca4cac3fe4a61ebf5..cdf0f8ba8b8fb58fb04f79a623c43352ac13a88f 100755
--- a/mk_memento_images.sh
+++ b/mk_memento_images.sh
@@ -10,13 +10,16 @@
set -e
-LIB_IMAGE_COMMON="$(dirname "$0")/image_common.sh"
-if ! . "$LIB_IMAGE_COMMON"; then
- echo "Missing required library: $LIB_IMAGE_COMMON. Cannot continue."
+# Load functions designed for image processing
+LIB_CROS_IMAGE_COMMON="$(dirname "$0")/lib/cros_image_common.sh"
+[ -f "$LIB_CROS_IMAGE_COMMON" ] ||
+ LIB_CROS_IMAGE_COMMON="$(dirname "$0")/cros_image_common.sh"
+if ! . "$LIB_CROS_IMAGE_COMMON"; then
+ echo "ERROR: Cannot load required library: $LIB_CROS_IMAGE_COMMON. Abort."
exit 1
fi
-if [ -z "$2" -o -z "$1" ]; then
+if [ -z "$2" -o -z "$1" ] || [ "${#@}" -ne 2 -a "${#@}" -ne 3 ]; then
echo "usage: $0 path/to/kernel_partition_img path/to/rootfs_partition_img"
echo " or $0 path/to/chromiumos_img kern_part_no rootfs_part_no"
exit 1
« make_factory_package.sh ('K') | « make_factory_package.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698