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

Side by Side Diff: src/scripts/build_chrome.sh

Issue 501153: Simplified counting CPUs. (Closed)
Patch Set: Created 10 years, 12 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 | « no previous file | src/scripts/build_kernel.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 #!/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 # Script for building our own custom Chrome 7 # Script for building our own custom Chrome
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
11 . "$(dirname "$0")/common.sh" 11 . "$(dirname "$0")/common.sh"
12 12
13 # Script must be run outside the chroot 13 # Script must be run outside the chroot
14 assert_outside_chroot 14 assert_outside_chroot
15 15
16 # This script defaults Chrome source is in ~/chrome 16 # This script defaults Chrome source is in ~/chrome
17 # You may override the Chrome source dir via the --chrome_dir option or by 17 # You may override the Chrome source dir via the --chrome_dir option or by
18 # setting CHROMEOS_CHROME_DIR (for example, in ./.chromeos_dev) 18 # setting CHROMEOS_CHROME_DIR (for example, in ./.chromeos_dev)
19 DEFAULT_CHROME_DIR="${CHROMEOS_CHROME_DIR:-/home/$USER/chrome}" 19 DEFAULT_CHROME_DIR="${CHROMEOS_CHROME_DIR:-/home/$USER/chrome}"
20 20
21 # The number of jobs to pass to tools that can run in parallel (such as make 21 # The number of jobs to pass to tools that can run in parallel (such as make
22 # and dpkg-buildpackage 22 # and dpkg-buildpackage
23 NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'` 23 NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
24 24
25 # Flags 25 # Flags
26 DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \ 26 DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \
27 "Directory to Chrome source" 27 "Directory to Chrome source"
28 DEFINE_string mode "Release" \ 28 DEFINE_string mode "Release" \
29 "The mode to build Chrome in (Debug or Release)" 29 "The mode to build Chrome in (Debug or Release)"
30 DEFINE_string num_jobs "$NUM_JOBS" \ 30 DEFINE_string num_jobs "$NUM_JOBS" \
31 "The number of jobs to run in parallel" 31 "The number of jobs to run in parallel"
32 32
33 # Parse command line 33 # Parse command line
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 echo Zipping $CHROME_LINUX_DIR to $OUTPUT_ZIP 66 echo Zipping $CHROME_LINUX_DIR to $OUTPUT_ZIP
67 cd $BUILD_DIR 67 cd $BUILD_DIR
68 rm -f $OUTPUT_ZIP 68 rm -f $OUTPUT_ZIP
69 zip -r1 $OUTPUT_ZIP chrome-chromeos -i "chrome-chromeos/chrome*" \ 69 zip -r1 $OUTPUT_ZIP chrome-chromeos -i "chrome-chromeos/chrome*" \
70 "chrome-chromeos/libffmpegsumo.so" "chrome-chromeos/xdg-settings" \ 70 "chrome-chromeos/libffmpegsumo.so" "chrome-chromeos/xdg-settings" \
71 "chrome-chromeos/locales/*" "chrome-chromeos/resources/*" \ 71 "chrome-chromeos/locales/*" "chrome-chromeos/resources/*" \
72 "chrome-chromeos/*.png" "chrome-chromeos/session" \ 72 "chrome-chromeos/*.png" "chrome-chromeos/session" \
73 "chrome-chromeos/emit_login_prompt_ready" -x "*.d" 73 "chrome-chromeos/emit_login_prompt_ready" -x "*.d"
74 cp -f $OUTPUT_ZIP $OUTPUT_DIR 74 cp -f $OUTPUT_ZIP $OUTPUT_DIR
75 echo Done. 75 echo Done.
OLDNEW
« no previous file with comments | « no previous file | src/scripts/build_kernel.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698