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

Unified Diff: get_latest_image.sh

Issue 2857020: Added --preserve option and logic. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Resolve conflicts Created 10 years, 6 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 | « build_image ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: get_latest_image.sh
diff --git a/get_latest_image.sh b/get_latest_image.sh
index 3cac3ecc73dc64cc019aee74985846a9f4279d6c..020cadf9dca0335bedf7af4c5370bc5100977b3f 100755
--- a/get_latest_image.sh
+++ b/get_latest_image.sh
@@ -26,6 +26,10 @@ if [ -z "$FLAGS_board" ] ; then
fi
IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}"
+
+# If there are no images, return nothing
+[ -d $IMAGES_DIR ] || exit 0
+
# Default to the most recent image
DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`"
« no previous file with comments | « build_image ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698