mirror of
https://github.com/flatcar/scripts.git
synced 2026-03-10 07:51:47 +01:00
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
This commit is contained in:
parent
b4529fa675
commit
736cdcc5bf
@ -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)
|
||||
Loading…
x
Reference in New Issue
Block a user