mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Fix archive_build.sh to work with new build using board subdirs.
Add some sane and useful defaults to common.sh for BOARDS. Review URL: http://codereview.chromium.org/647053
This commit is contained in:
parent
49879bc938
commit
4930294039
@ -1,6 +1,6 @@
|
||||
#!/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.
|
||||
|
||||
@ -15,10 +15,12 @@ assert_outside_chroot
|
||||
|
||||
IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images"
|
||||
# Default to the most recent image
|
||||
DEFAULT_FROM="${IMAGES_DIR}/`ls -t1 $IMAGES_DIR | head -1`"
|
||||
DEFAULT_TO="${GCLIENT_ROOT}/archive"
|
||||
|
||||
# Flags
|
||||
DEFINE_string board "$DEFAULT_BOARD" \
|
||||
"The board to build packages for."
|
||||
DEFAULT_FROM="${IMAGES_DIR}/$FLAGS_board/$(ls -t1 $IMAGES_DIR/$FLAGS_board | head -1)"
|
||||
DEFINE_string from "$DEFAULT_FROM" \
|
||||
"Directory to archive"
|
||||
DEFINE_string to "$DEFAULT_TO" "Directory of build archive"
|
||||
|
||||
10
common.sh
10
common.sh
@ -1,4 +1,4 @@
|
||||
# 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.
|
||||
|
||||
@ -97,6 +97,14 @@ DEFAULT_CHROOT_DIR=${CHROMEOS_CHROOT_DIR:-"$GCLIENT_ROOT/chroot"}
|
||||
# they don't pollute the source directory.
|
||||
DEFAULT_BUILD_ROOT=${CHROMEOS_BUILD_ROOT:-"$SRC_ROOT/build"}
|
||||
|
||||
# Set up a global ALL_BOARDS value
|
||||
ALL_BOARDS=$(cd ../overlays;ls -1d overlay-* 2>&-|sed 's,overlay-,,g')
|
||||
# Strip CR
|
||||
ALL_BOARDS=$(echo $ALL_BOARDS)
|
||||
# Set a default BOARD
|
||||
#DEFAULT_BOARD=x86-generic # or...
|
||||
DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}')
|
||||
|
||||
# Detect whether we're inside a chroot or not
|
||||
if [ -e /etc/debian_chroot ]
|
||||
then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user