| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Common constants for build scripts | 5 # Common constants for build scripts |
| 6 # This must evaluate properly for both /bin/bash and /bin/sh | 6 # This must evaluate properly for both /bin/bash and /bin/sh |
| 7 | 7 |
| 8 # All scripts should die on error unless commands are specifically excepted | 8 # All scripts should die on error unless commands are specifically excepted |
| 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. | 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. |
| 10 # TODO: Re-enable this once shflags is less prone to dying. | 10 # TODO: Re-enable this once shflags is less prone to dying. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 DEFAULT_IMG_SUITE=${CHROMEOS_IMG_SUITE:-"karmic"} | 91 DEFAULT_IMG_SUITE=${CHROMEOS_IMG_SUITE:-"karmic"} |
| 92 | 92 |
| 93 # Default location for chroot | 93 # Default location for chroot |
| 94 DEFAULT_CHROOT_DIR=${CHROMEOS_CHROOT_DIR:-"$GCLIENT_ROOT/chroot"} | 94 DEFAULT_CHROOT_DIR=${CHROMEOS_CHROOT_DIR:-"$GCLIENT_ROOT/chroot"} |
| 95 | 95 |
| 96 # All output files from build should go under $DEFAULT_BUILD_ROOT, so that | 96 # All output files from build should go under $DEFAULT_BUILD_ROOT, so that |
| 97 # they don't pollute the source directory. | 97 # they don't pollute the source directory. |
| 98 DEFAULT_BUILD_ROOT=${CHROMEOS_BUILD_ROOT:-"$SRC_ROOT/build"} | 98 DEFAULT_BUILD_ROOT=${CHROMEOS_BUILD_ROOT:-"$SRC_ROOT/build"} |
| 99 | 99 |
| 100 # Set up a global ALL_BOARDS value | 100 # Set up a global ALL_BOARDS value |
| 101 ALL_BOARDS=$(cd ../overlays;ls -1d overlay-* 2>&-|sed 's,overlay-,,g') | 101 ALL_BOARDS=$(cd $SRC_ROOT/overlays;ls -1d overlay-* 2>&-|sed 's,overlay-,,g') |
| 102 # Strip CR | 102 # Strip CR |
| 103 ALL_BOARDS=$(echo $ALL_BOARDS) | 103 ALL_BOARDS=$(echo $ALL_BOARDS) |
| 104 # Set a default BOARD | 104 # Set a default BOARD |
| 105 #DEFAULT_BOARD=x86-generic # or... | 105 #DEFAULT_BOARD=x86-generic # or... |
| 106 DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}') | 106 DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}') |
| 107 | 107 |
| 108 # Detect whether we're inside a chroot or not | 108 # Detect whether we're inside a chroot or not |
| 109 if [ -e /etc/debian_chroot ] | 109 if [ -e /etc/debian_chroot ] |
| 110 then | 110 then |
| 111 INSIDE_CHROOT=1 | 111 INSIDE_CHROOT=1 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 V_RED="\e[31m" | 236 V_RED="\e[31m" |
| 237 V_YELLOW="\e[33m" | 237 V_YELLOW="\e[33m" |
| 238 | 238 |
| 239 function warn { | 239 function warn { |
| 240 echo -e "${V_YELLOW}Warning..: $1${V_VIDOFF}" | 240 echo -e "${V_YELLOW}Warning..: $1${V_VIDOFF}" |
| 241 } | 241 } |
| 242 | 242 |
| 243 function error { | 243 function error { |
| 244 echo -e "${V_RED}Error....: $1${V_VIDOFF}" | 244 echo -e "${V_RED}Error....: $1${V_VIDOFF}" |
| 245 } | 245 } |
| OLD | NEW |