| Index: mod_image_for_test.sh
|
| diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh
|
| index b9f123fb0aa51536231f72414bacef3d8b18a853..822a293262469837388005b2d7d25b4eba9378f1 100755
|
| --- a/mod_image_for_test.sh
|
| +++ b/mod_image_for_test.sh
|
| @@ -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")
|
|
|