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

Side by Side Diff: src/scripts/get_latest_image.sh

Issue 1702014: adds default board to get_latest_image (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Created 10 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Prints the path to the most recently built image to stdout. 7 # Prints the path to the most recently built image to stdout.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
11 . "$(dirname "$0")/common.sh" 11 . "$(dirname "$0")/common.sh"
12 12
13 DEFINE_string board "" "The name of the board to check for images." 13 get_default_board
14
15 DEFINE_string board "$DEFAULT_BOARD" \
16 "The name of the board to check for images."
14 17
15 # Parse command line flags 18 # Parse command line flags
16 FLAGS "$@" || exit 1 19 FLAGS "$@" || exit 1
17 eval set -- "${FLAGS_ARGV}" 20 eval set -- "${FLAGS_ARGV}"
18 21
19 # Check on the board that they are trying to set up. 22 # Check on the board that they are trying to set up.
20 if [ -z "$FLAGS_board" ] ; then 23 if [ -z "$FLAGS_board" ] ; then
21 echo "Error: --board required." 24 echo "Error: --board required."
22 exit 1 25 exit 1
23 fi 26 fi
24 27
25 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" 28 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}"
26 # Default to the most recent image 29 # Default to the most recent image
27 DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`" 30 DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`"
28 31
29 echo $DEFAULT_FROM 32 echo $DEFAULT_FROM
OLDNEW
« 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