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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 set -e | 68 set -e |
69 | 69 |
70 # Read settings | 70 # Read settings |
71 . $CHROMEOS_DEV_SETTINGS | 71 . $CHROMEOS_DEV_SETTINGS |
72 | 72 |
73 # Restore previous state of exit-on-error | 73 # Restore previous state of exit-on-error |
74 eval "$SAVE_OPTS" | 74 eval "$SAVE_OPTS" |
75 fi | 75 fi |
76 | 76 |
77 # Load shflags | 77 # Load shflags |
78 . "$SRC_ROOT/third_party/shflags/files/src/shflags" | 78 . "${SRC_ROOT}/scripts/lib/shflags/shflags" |
79 | 79 |
80 # Our local mirror | 80 # Our local mirror |
81 DEFAULT_CHROMEOS_SERVER=${CHROMEOS_SERVER:-"http://build.chromium.org/mirror"} | 81 DEFAULT_CHROMEOS_SERVER=${CHROMEOS_SERVER:-"http://build.chromium.org/mirror"} |
82 | 82 |
83 # Upstream mirrors and build suites come in 2 flavors | 83 # Upstream mirrors and build suites come in 2 flavors |
84 # DEV - development chroot, used to build the chromeos image | 84 # DEV - development chroot, used to build the chromeos image |
85 # IMG - bootable image, to run on actual hardware | 85 # IMG - bootable image, to run on actual hardware |
86 | 86 |
87 DEFAULT_DEV_MIRROR=${CHROMEOS_DEV_MIRROR:-"${DEFAULT_CHROMEOS_SERVER}/ubuntu"} | 87 DEFAULT_DEV_MIRROR=${CHROMEOS_DEV_MIRROR:-"${DEFAULT_CHROMEOS_SERVER}/ubuntu"} |
88 DEFAULT_DEV_SUITE=${CHROMEOS_DEV_SUITE:-"karmic"} | 88 DEFAULT_DEV_SUITE=${CHROMEOS_DEV_SUITE:-"karmic"} |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 start_time=$(date +%s) | 439 start_time=$(date +%s) |
440 | 440 |
441 # Print time elsapsed since start_time. | 441 # Print time elsapsed since start_time. |
442 print_time_elapsed() { | 442 print_time_elapsed() { |
443 end_time=$(date +%s) | 443 end_time=$(date +%s) |
444 elapsed_seconds="$(( $end_time - $start_time ))" | 444 elapsed_seconds="$(( $end_time - $start_time ))" |
445 minutes="$(( $elapsed_seconds / 60 ))" | 445 minutes="$(( $elapsed_seconds / 60 ))" |
446 seconds="$(( $elapsed_seconds % 60 ))" | 446 seconds="$(( $elapsed_seconds % 60 ))" |
447 echo "Elapsed time: ${minutes}:${seconds}" | 447 echo "Elapsed time: ${minutes}:${seconds}" |
448 } | 448 } |
OLD | NEW |