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

Side by Side Diff: common.sh

Issue 3059001: Enable fast build by default in build_image and mod_image_for_test.sh. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Only enable by default in non-official builds Created 10 years, 4 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 | « build_image ('k') | mod_image_for_test.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 $SRC_ROOT/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 # Enable --fast by default on non-official builds
109 DEFAULT_FAST="${FLAGS_TRUE}"
110 if [ "${CHROMEOS_OFFICIAL:-0}" = "1" ]; then
111 DEFAULT_FAST="${FLAGS_FALSE}"
112 fi
113
108 # Detect whether we're inside a chroot or not 114 # Detect whether we're inside a chroot or not
109 if [ -e /etc/debian_chroot ] 115 if [ -e /etc/debian_chroot ]
110 then 116 then
111 INSIDE_CHROOT=1 117 INSIDE_CHROOT=1
112 else 118 else
113 INSIDE_CHROOT=0 119 INSIDE_CHROOT=0
114 fi 120 fi
115 121
116 # Directory locations inside the dev chroot 122 # Directory locations inside the dev chroot
117 CHROOT_TRUNK_DIR="/home/$USER/trunk" 123 CHROOT_TRUNK_DIR="/home/$USER/trunk"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 start_time=$(date +%s) 445 start_time=$(date +%s)
440 446
441 # Print time elsapsed since start_time. 447 # Print time elsapsed since start_time.
442 print_time_elapsed() { 448 print_time_elapsed() {
443 end_time=$(date +%s) 449 end_time=$(date +%s)
444 elapsed_seconds="$(( $end_time - $start_time ))" 450 elapsed_seconds="$(( $end_time - $start_time ))"
445 minutes="$(( $elapsed_seconds / 60 ))" 451 minutes="$(( $elapsed_seconds / 60 ))"
446 seconds="$(( $elapsed_seconds % 60 ))" 452 seconds="$(( $elapsed_seconds % 60 ))"
447 echo "Elapsed time: ${minutes}:${seconds}" 453 echo "Elapsed time: ${minutes}:${seconds}"
448 } 454 }
OLDNEW
« no previous file with comments | « build_image ('k') | mod_image_for_test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698