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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 fi | 124 fi |
125 | 125 |
126 # Directory locations inside the dev chroot | 126 # Directory locations inside the dev chroot |
127 CHROOT_TRUNK_DIR="/home/$USER/trunk" | 127 CHROOT_TRUNK_DIR="/home/$USER/trunk" |
128 | 128 |
129 # Install make for portage ebuilds. Used by build_image and gmergefs. | 129 # Install make for portage ebuilds. Used by build_image and gmergefs. |
130 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ | 130 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ |
131 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ | 131 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ |
132 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ | 132 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ |
133 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ | 133 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ |
134 /usr/share/openrc /lib/rc *.a *.la /etc/init.d /usr/lib/debug" | 134 /usr/share/openrc /lib/rc *.a *.la /etc/init.d /usr/lib/debug |
| 135 /usr/local/autotest /usr/local/autotest-chrome" |
135 | 136 |
136 FACTORY_INSTALL_MASK="/opt/google/chrome /opt/google/o3d /opt/netscape \ | 137 FACTORY_INSTALL_MASK="/opt/google/chrome /opt/google/o3d /opt/netscape \ |
137 /usr/lib/dri /usr/lib/python2.6/test /usr/share/chewing /usr/share/fonts \ | 138 /usr/lib/dri /usr/lib/python2.6/test /usr/share/chewing /usr/share/fonts \ |
138 /usr/share/ibus-pinyin /usr/share/libhangul /usr/share/locale \ | 139 /usr/share/ibus-pinyin /usr/share/libhangul /usr/share/locale \ |
139 /usr/share/m17n /usr/share/mime /usr/share/sounds /usr/share/tts \ | 140 /usr/share/m17n /usr/share/mime /usr/share/sounds /usr/share/tts \ |
140 /usr/share/X11 /usr/share/zoneinfo /usr/lib/debug" | 141 /usr/share/X11 /usr/share/zoneinfo /usr/lib/debug |
| 142 /usr/local/autotest /usr/local/autotest-chrome" |
141 | 143 |
142 # Check to ensure not running old scripts | 144 # Check to ensure not running old scripts |
143 V_REVERSE='[7m' | 145 V_REVERSE='[7m' |
144 V_VIDOFF='[m' | 146 V_VIDOFF='[m' |
145 case "$(basename $0)" in | 147 case "$(basename $0)" in |
146 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) | 148 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) |
147 echo | 149 echo |
148 echo "$V_REVERSE============================================================" | 150 echo "$V_REVERSE============================================================" |
149 echo "=========================== WARNING ======================" | 151 echo "=========================== WARNING ======================" |
150 echo "============================================================$V_VIDOFF" | 152 echo "============================================================$V_VIDOFF" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 start_time=$(date +%s) | 451 start_time=$(date +%s) |
450 | 452 |
451 # Print time elsapsed since start_time. | 453 # Print time elsapsed since start_time. |
452 print_time_elapsed() { | 454 print_time_elapsed() { |
453 end_time=$(date +%s) | 455 end_time=$(date +%s) |
454 elapsed_seconds="$(( $end_time - $start_time ))" | 456 elapsed_seconds="$(( $end_time - $start_time ))" |
455 minutes="$(( $elapsed_seconds / 60 ))" | 457 minutes="$(( $elapsed_seconds / 60 ))" |
456 seconds="$(( $elapsed_seconds % 60 ))" | 458 seconds="$(( $elapsed_seconds % 60 ))" |
457 echo "Elapsed time: ${minutes}m${seconds}s" | 459 echo "Elapsed time: ${minutes}m${seconds}s" |
458 } | 460 } |
OLD | NEW |