Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: mod_image_for_test.sh

Issue 6538031: Move check for image until we actually need it. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Die Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698