From 736cdcc5bfa08d5334308644a3e2b59ac4e05f78 Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Tue, 22 Jun 2010 17:21:05 -0700 Subject: [PATCH] Tiny bit of clean up and follow new script naming convention. TEST=Re-ran script and downloaded latest image. Review URL: http://codereview.chromium.org/2805022 --- ...oad_latest_image.sh => cros_download_latest_image | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename download_latest_image.sh => cros_download_latest_image (86%) diff --git a/download_latest_image.sh b/cros_download_latest_image similarity index 86% rename from download_latest_image.sh rename to cros_download_latest_image index 670a41aae2..a0715d9189 100755 --- a/download_latest_image.sh +++ b/cros_download_latest_image @@ -1,11 +1,11 @@ #!/bin/bash -# Copyright (c) 2009 The Chromium OS Authors. All rights reserved. +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Downloads the latest buildbot image and prints the path to it. -# This only works internally at Google. +# This script only works if you have access to buildbot images. # Load common constants. This should be the first executable line. # The path to common.sh should be relative to your script's location. @@ -17,14 +17,13 @@ DEFINE_string board "$DEFAULT_BOARD" \ "The name of the board to check for images." DEFINE_boolean incremental "${FLAGS_FALSE}" "Download incremental build" -# Parse command line flags +# Parse command line flags. FLAGS "$@" || exit 1 eval set -- "${FLAGS_ARGV}" # Check on the board that they are trying to set up. if [ -z "$FLAGS_board" ] ; then - echo "Error: --board required." - exit 1 + die "Error: --board required." fi IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" @@ -36,8 +35,7 @@ if [ $FLAGS_board = x86-generic ]; then URL_PREFIX="http://codg163.jail.google.com/archive/x86-generic-rel" fi else - echo "Unrecognized board: $FLAGS_board" >&2 - exit 1 + die "Unrecognized board: $FLAGS_board" fi LATEST_BUILD=$(curl -s $URL_PREFIX/LATEST)