diff --git a/image_common.sh b/lib/cros_image_common.sh similarity index 100% rename from image_common.sh rename to lib/cros_image_common.sh diff --git a/make_factory_package.sh b/make_factory_package.sh index a251980a12..a62cfe2e3c 100755 --- a/make_factory_package.sh +++ b/make_factory_package.sh @@ -19,7 +19,8 @@ . "$(dirname "$0")/chromeos-common.sh" # Load functions designed for image processing -. "$(dirname "$0")/image_common.sh" +. "$(dirname "$0")/lib/cros_image_common.sh" || + die "Cannot load required library: lib/cros_image_common.sh; Abort." get_default_board diff --git a/mk_memento_images.sh b/mk_memento_images.sh index b5d786135c..415768fb4b 100755 --- a/mk_memento_images.sh +++ b/mk_memento_images.sh @@ -10,13 +10,13 @@ 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 +if ! . "$(dirname "$0")/lib/cros_image_common.sh"; then + echo "ERROR: Cannot load required library: lib/cros_image_common.sh; 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