Index: mod_image_for_test.sh |
diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh |
index b9f123fb0aa51536231f72414bacef3d8b18a853..484a898b78b7a75d519a569f7746138101b3b758 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,12 @@ 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 |
+ echo "No image found at $FLAGS_image to modify" |
petkov
2011/02/17 20:00:41
die
|
+ exit 1 |
+fi |
+ |
set -e |
IMAGE_DIR=$(dirname "$FLAGS_image") |