diff --git a/build_image b/build_image index c7c8529dfc..cc3fae5688 100755 --- a/build_image +++ b/build_image @@ -116,8 +116,8 @@ fi if [ $((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) -gt \ ${FLAGS_rootfs_partition_size} ] ; then - die "rootfs ($((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) MiB) is \ -bigger than partition (${FLAGS_rootfs_partition_size} MiB)." + die "rootfs ($((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) MiB) is" \ + "bigger than partition (${FLAGS_rootfs_partition_size} MiB)." fi # If we are creating a developer image, also create a pristine image with a @@ -179,8 +179,8 @@ create_base_image ${PRISTINE_IMAGE_NAME} BOOT_FLAG= if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then BOOT_FLAG="-b 1" # BOOT_FLAG_DEVELOPER value defined in load_kernel_fw.h - info "--factory_install set, pass BOOT_FLAG_DEVELOPER flag to \ -load_kernel_test" + info "--factory_install set, pass BOOT_FLAG_DEVELOPER flag to" \ + "load_kernel_test" fi # Verify pristine image if we built it. diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 2e9977a0e0..091cc9659b 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -159,8 +159,8 @@ create_base_image() { LIBC_PATH="${PKGDIR}/cross-${CHOST}/${LIBC_TAR}" if ! [[ -e ${LIBC_PATH} ]]; then - die "${LIBC_PATH} does not exist. Try running ./setup_board --board=\ -${BOARD} to update the version of libc installed on that board." + die "${LIBC_PATH} does not exist. Try running ./setup_board" \ + "--board=${BOARD} to update the version of libc installed on that board." fi sudo tar jxpf "${LIBC_PATH}" -C "${ROOT_FS_DIR}" ./usr/${CHOST} \ diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index f1e3513fff..ee44f9b723 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -81,8 +81,8 @@ parse_build_image_args() { if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then for image in ${CHROMEOS_BASE_IMAGE_NAME} ${CHROMEOS_DEVELOPER_IMAGE_NAME}\ ${CHROMEOS_TEST_IMAGE_NAME} ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; do - should_build_image ${image} && die \ - "Can't build both $image and ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}." + should_build_image ${image} && die "Can't build both $image" \ + "and ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}." done FLAGS_withdev=${FLAGS_FALSE} FLAGS_test=${FLAGS_FALSE} @@ -93,35 +93,35 @@ parse_build_image_args() { # Legacy method for tweaking flags to do the right thing. if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then - info "Incompatible flags: --factory and --factory_install cannot both \ - be set to True. Resetting --factory to False." + info "Incompatible flags: --factory and --factory_install cannot both" \ + "be set to True. Resetting --factory to False." FLAGS_factory=${FLAGS_FALSE} fi if [ ${FLAGS_test} -eq ${FLAGS_TRUE} ]; then - info "Incompatible flags: --test and --factory_install cannot both be \ - set to True. Resetting --test to False." + info "Incompatible flags: --test and --factory_install cannot both be" \ + "set to True. Resetting --test to False." FLAGS_test=${FLAGS_FALSE} fi # Disable --withdev flag when --factory_install is set to True. Otherwise, # the dev image produced will be based on install shim, rather than a # pristine image. if [ ${FLAGS_withdev} -eq ${FLAGS_TRUE} ]; then - info "Incompatible flags: --withdev and --factory_install cannot both \ - be set to True. Resetting --withdev to False." + info "Incompatible flags: --withdev and --factory_install cannot both" \ + "be set to True. Resetting --withdev to False." FLAGS_withdev=${FLAGS_FALSE} fi fi if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then if [ ${FLAGS_test} -eq ${FLAGS_FALSE} ]; then - info "Incompatible flags: --factory implies --test. Resetting --test \ - to True." + info "Incompatible flags: --factory implies --test. Resetting --test" \ + "to True." FLAGS_test=${FLAGS_TRUE} fi fi if [ ${FLAGS_test} -eq ${FLAGS_TRUE} ]; then if [ ${FLAGS_withdev} -eq ${FLAGS_FALSE} ]; then - info "Incompatible flags: --test implies --withdev. Resetting \ - --withdev to True." + info "Incompatible flags: --test implies --withdev. Resetting" \ + "--withdev to True." FLAGS_withdev=${FLAGS_TRUE} fi fi diff --git a/common.sh b/common.sh index e1f3f1e002..ae43236042 100644 --- a/common.sh +++ b/common.sh @@ -321,19 +321,19 @@ function check_flags_only_and_allow_null_arg { } function info { - echo -e >&2 "${V_BOLD_GREEN}INFO ${CROS_LOG_PREFIX:-""}: $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_GREEN}INFO ${CROS_LOG_PREFIX:-""}: $@${V_VIDOFF}" } function warn { - echo -e >&2 "${V_BOLD_YELLOW}WARNING ${CROS_LOG_PREFIX:-""}: $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_YELLOW}WARNING ${CROS_LOG_PREFIX:-""}: $@${V_VIDOFF}" } function error { - echo -e >&2 "${V_BOLD_RED}ERROR ${CROS_LOG_PREFIX:-""}: $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_RED}ERROR ${CROS_LOG_PREFIX:-""}: $@${V_VIDOFF}" } function die { - error "$1" + error "$@" exit 1 }