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

Side by Side Diff: cros_download_latest_image

Issue 3110040: Make cros_download_latest_image echo its newline to stderr (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 3 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) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 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 # Downloads the latest buildbot image and prints the path to it. 7 # Downloads the latest buildbot image and prints the path to it.
8 # This script only works if you have access to buildbot images. 8 # This script only works if you have access to buildbot images.
9 9
10 # Load common constants. This should be the first executable line. 10 # Load common constants. This should be the first executable line.
(...skipping 23 matching lines...) Expand all
34 else 34 else
35 URL_PREFIX="https://sandbox.google.com/storage/chromeos-archive/x86-generic- rel" 35 URL_PREFIX="https://sandbox.google.com/storage/chromeos-archive/x86-generic- rel"
36 fi 36 fi
37 else 37 else
38 die "Unrecognized board: $FLAGS_board" 38 die "Unrecognized board: $FLAGS_board"
39 fi 39 fi
40 40
41 read -p "Username [${LOGNAME}]: " GSDCURL_USERNAME 41 read -p "Username [${LOGNAME}]: " GSDCURL_USERNAME
42 export GSDCURL_USERNAME 42 export GSDCURL_USERNAME
43 read -s -p "Password: " GSDCURL_PASSWORD 43 read -s -p "Password: " GSDCURL_PASSWORD
44 echo # ... because read -s didn't print a newline 44 echo >&2 # ... because read -s didn't print a newline
45 export GSDCURL_PASSWORD 45 export GSDCURL_PASSWORD
46 46
47 LATEST_BUILD=$(bin/cros_gsdcurl.py -s $URL_PREFIX/LATEST) 47 LATEST_BUILD=$(bin/cros_gsdcurl.py -s $URL_PREFIX/LATEST)
48 LATEST_IMAGE_DIR="$IMAGES_DIR/$LATEST_BUILD" 48 LATEST_IMAGE_DIR="$IMAGES_DIR/$LATEST_BUILD"
49 if [ ! -e $LATEST_IMAGE_DIR/chromiumos_base_image.bin ]; then 49 if [ ! -e $LATEST_IMAGE_DIR/chromiumos_base_image.bin ]; then
50 mkdir -p $LATEST_IMAGE_DIR 50 mkdir -p $LATEST_IMAGE_DIR
51 bin/cros_gsdcurl.py $URL_PREFIX/$LATEST_BUILD/image.zip -o \ 51 bin/cros_gsdcurl.py $URL_PREFIX/$LATEST_BUILD/image.zip -o \
52 $LATEST_IMAGE_DIR/image.zip \ 52 $LATEST_IMAGE_DIR/image.zip \
53 || die "Could not download image.zip" 53 || die "Could not download image.zip"
54 ( cd $LATEST_IMAGE_DIR && unzip -qo image.zip ) \ 54 ( cd $LATEST_IMAGE_DIR && unzip -qo image.zip ) \
55 || die "Could not unzip image.zip" 55 || die "Could not unzip image.zip"
56 fi 56 fi
57 57
58 echo $LATEST_IMAGE_DIR 58 echo $LATEST_IMAGE_DIR
59 exit 0 59 exit 0
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