crosutils: move image_common.sh to lib/cros_image_common.sh

The team is moving utility/library scripts into 'lib' folder.
image_common.sh should follow this policy.

Also refined the parameter check of mk_memento_images.sh

BUG=chromium-os:5208
TEST=./make_factory_package.sh --factory PATH_TO_FACTORY --release PATH_TO_RELEASE;
     # factory bundle created successfully
     ./mk_memento_images.sh PATH_TO_PART2 PATH_TO_PART3
     # update.gz created successfully
     ./mk_memento_images.sh PATH_TO_IMGE 2 3
     # update.gz created successfully

Change-Id: I3afecf05da2832986723f28b595045d0540ea9e9

Review URL: http://codereview.chromium.org/4825004
This commit is contained in:
Hung-Te Lin 2010-11-13 05:36:20 +08:00
parent c60e567799
commit bcc60b625d
3 changed files with 6 additions and 5 deletions

View File

@ -19,7 +19,8 @@
. "$(dirname "$0")/chromeos-common.sh" . "$(dirname "$0")/chromeos-common.sh"
# Load functions designed for image processing # 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 get_default_board

View File

@ -10,13 +10,13 @@
set -e set -e
LIB_IMAGE_COMMON="$(dirname "$0")/image_common.sh" # Load functions designed for image processing
if ! . "$LIB_IMAGE_COMMON"; then if ! . "$(dirname "$0")/lib/cros_image_common.sh"; then
echo "Missing required library: $LIB_IMAGE_COMMON. Cannot continue." echo "ERROR: Cannot load required library: lib/cros_image_common.sh; Abort."
exit 1 exit 1
fi 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 "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" echo " or $0 path/to/chromiumos_img kern_part_no rootfs_part_no"
exit 1 exit 1