diff --git a/archive_build.sh b/archive_build.sh index 3ceefa4eed..c1a166d889 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -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" diff --git a/common.sh b/common.sh index 07b5cbb706..10fce47d57 100644 --- a/common.sh +++ b/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