Move check for image until we actually need it.

This addresses the case where we don't have chromiumos_image.bin but don't
actually need it since we've previously generated a test image.

Change-Id: Ie7be0165e0f68bbd9d34156b55e17d971cb86fa9

BUG=chromium-os:12268
TEST=Ran it with --noinplace and missing dev image.

Review URL: http://codereview.chromium.org/6538031
This commit is contained in:
Chris Sosa 2011-02-17 12:42:22 -08:00
parent ed145d0c51
commit 9769c6bc9f

View File

@ -87,12 +87,6 @@ fi
# Turn path into an absolute path.
FLAGS_image=`eval readlink -f ${FLAGS_image}`
# Abort early if we can't find the image
if [ ! -f $FLAGS_image ] ; then
echo "No image found at $FLAGS_image"
exit 1
fi
# What cross-build are we targeting?
. "${FLAGS_build_root}/${FLAGS_board}/etc/make.conf.board_setup"
# Figure out ARCH from the given toolchain.
@ -214,6 +208,11 @@ else
echo "Modifying image ${FLAGS_image} for test..."
fi
# Abort early if we can't find the image
if [ ! -f $FLAGS_image ] && [ ${FLAGS_inplace} -eq ${FLAGS_TRUE} ; then
die "No image found at $FLAGS_image to modify"
fi
set -e
IMAGE_DIR=$(dirname "$FLAGS_image")