| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Load common constants. This should be the first executable line. | 7 # Load common constants. This should be the first executable line. |
| 8 # The path to common.sh should be relative to your script's location. | 8 # The path to common.sh should be relative to your script's location. |
| 9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
| 10 | 10 |
| 11 verbose() { |
| 12 echo "$@" |
| 13 "$@" |
| 14 } |
| 15 |
| 11 assert_inside_chroot | 16 assert_inside_chroot |
| 12 assert_not_root_user | 17 assert_not_root_user |
| 13 | 18 |
| 14 # Flags | 19 # Flags |
| 15 DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser." | 20 DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser." |
| 16 DEFINE_boolean new_build $FLAGS_FALSE "Use chromiumos-build." | 21 DEFINE_boolean new_build $FLAGS_FALSE "Use chromiumos-build." |
| 17 DEFINE_string architecture i386 "The architecture to build for (--new_build only
)." a | 22 DEFINE_string architecture i386 "The architecture to build for (--new_build only
)." a |
| 18 | 23 |
| 19 # Fix up the command line and parse with shflags. | 24 # Fix up the command line and parse with shflags. |
| 20 FIXED_FLAGS="$@" | 25 FIXED_FLAGS="$@" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 # Passed to copy_chrome_zip.sh to get stable version of the browser | 55 # Passed to copy_chrome_zip.sh to get stable version of the browser |
| 51 export GET_STABLE_CHROME=1 | 56 export GET_STABLE_CHROME=1 |
| 52 fi | 57 fi |
| 53 | 58 |
| 54 if [ $FLAGS_new_build -eq $FLAGS_TRUE ]; then | 59 if [ $FLAGS_new_build -eq $FLAGS_TRUE ]; then |
| 55 # chromiumos-build works out the build order for itself. | 60 # chromiumos-build works out the build order for itself. |
| 56 PACKAGES='dh-chromeos libchrome libchromeos' | 61 PACKAGES='dh-chromeos libchrome libchromeos' |
| 57 for PKG in $PLATFORM_DIRS $THIRD_PARTY_PACKAGES; do | 62 for PKG in $PLATFORM_DIRS $THIRD_PARTY_PACKAGES; do |
| 58 PACKAGES="$PACKAGES ${PKG%/*}" | 63 PACKAGES="$PACKAGES ${PKG%/*}" |
| 59 done | 64 done |
| 60 echo chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES | 65 verbose chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES |
| 61 chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES | |
| 62 else | 66 else |
| 63 # Build dh-chromeos really first. Some of third_party needs it. | 67 # Build dh-chromeos really first. Some of third_party needs it. |
| 64 echo "Building package dh-chromeos..." | 68 echo "Building package dh-chromeos..." |
| 65 cd "$PLATFORM_DIR/dh-chromeos" | 69 cd "$PLATFORM_DIR/dh-chromeos" |
| 66 ./make_pkg.sh | 70 ./make_pkg.sh |
| 67 cd - | 71 cd - |
| 68 | 72 |
| 69 # Build third_party packages first, since packages and libs depend on them. | 73 # Build third_party packages first, since packages and libs depend on them. |
| 70 for i in $THIRD_PARTY_PACKAGES | 74 for i in $THIRD_PARTY_PACKAGES |
| 71 do | 75 do |
| (...skipping 19 matching lines...) Expand all Loading... |
| 91 for i in $PLATFORM_DIRS | 95 for i in $PLATFORM_DIRS |
| 92 do | 96 do |
| 93 echo "Building package ${i}..." | 97 echo "Building package ${i}..." |
| 94 cd "$PLATFORM_DIR/$i" | 98 cd "$PLATFORM_DIR/$i" |
| 95 ./make_pkg.sh | 99 ./make_pkg.sh |
| 96 cd - | 100 cd - |
| 97 done | 101 done |
| 98 fi | 102 fi |
| 99 | 103 |
| 100 echo "All packages built." | 104 echo "All packages built." |
| OLD | NEW |