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

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

Issue 633001: fixup autoupdate for new build system (Closed)
Patch Set: per review comments Created 10 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 unified diff | Download patch
« no previous file with comments | « src/scripts/build_autotest.sh ('k') | 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 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images" 13 DEFINE_string board "" "The name of the board to check for images."
14
15 # Parse command line flags
16 FLAGS "$@" || exit 1
17 eval set -- "${FLAGS_ARGV}"
18
19 # Check on the board that they are trying to set up.
20 if [ -z "$FLAGS_board" ] ; then
21 echo "Error: --board required."
22 exit 1
23 fi
24
25 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}"
14 # Default to the most recent image 26 # Default to the most recent image
15 DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`" 27 DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`"
16 28
17 echo $DEFAULT_FROM 29 echo $DEFAULT_FROM
OLDNEW
« no previous file with comments | « src/scripts/build_autotest.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698