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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 then | 110 then |
111 INSIDE_CHROOT=1 | 111 INSIDE_CHROOT=1 |
112 else | 112 else |
113 INSIDE_CHROOT=0 | 113 INSIDE_CHROOT=0 |
114 fi | 114 fi |
115 | 115 |
116 # Directory locations inside the dev chroot | 116 # Directory locations inside the dev chroot |
117 CHROOT_TRUNK_DIR="/home/$USER/trunk" | 117 CHROOT_TRUNK_DIR="/home/$USER/trunk" |
118 | 118 |
119 # Install make for portage ebuilds. Used by build_image and gmergefs. | 119 # Install make for portage ebuilds. Used by build_image and gmergefs. |
120 DEFAULT_INSTALL_MASK="/usr/include/ /usr/man /usr/share/man /usr/share/doc \ | 120 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ |
121 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ | 121 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ |
122 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ | 122 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ |
123 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ | 123 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ |
124 /usr/share/openrc /lib/rc *.a *.la" | 124 /usr/share/openrc /lib/rc *.a *.la" |
125 | 125 |
126 # Check to ensure not running old scripts | 126 # Check to ensure not running old scripts |
127 V_REVERSE='[7m' | 127 V_REVERSE='[7m' |
128 V_VIDOFF='[m' | 128 V_VIDOFF='[m' |
129 case "$(basename $0)" in | 129 case "$(basename $0)" in |
130 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) | 130 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 path=${1:?} | 345 path=${1:?} |
346 shift | 346 shift |
347 | 347 |
348 if ! sudo umount -d "${path}"; then | 348 if ! sudo umount -d "${path}"; then |
349 warn "Failed to unmount ${path}" | 349 warn "Failed to unmount ${path}" |
350 warn "Doing a lazy unmount" | 350 warn "Doing a lazy unmount" |
351 | 351 |
352 sudo umount -d -l "${path}" || die "Failed to lazily unmount ${path}" | 352 sudo umount -d -l "${path}" || die "Failed to lazily unmount ${path}" |
353 fi | 353 fi |
354 } | 354 } |
OLD | NEW |