summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 18:17:53 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 18:17:53 +0000
commit1eae2bfbdc91481b81de1e7244791a0229f677ac (patch)
tree9ce75a074a036b9afb5a09e7c832ac7a35e6f10c /build
parent984a4d13671e3c2d1ac459b391256cbdb1de977d (diff)
downloadchromium_src-1eae2bfbdc91481b81de1e7244791a0229f677ac.zip
chromium_src-1eae2bfbdc91481b81de1e7244791a0229f677ac.tar.gz
chromium_src-1eae2bfbdc91481b81de1e7244791a0229f677ac.tar.bz2
Add options to install-build-deps.sh to enable unattended mode.
BUG=30328 TEST=run with unattended options, verify no prompt Review URL: http://codereview.chromium.org/549160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/install-build-deps.sh90
1 files changed, 67 insertions, 23 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index 7a64b35..15deaea 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -8,6 +8,30 @@
# See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions
# and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit
+usage() {
+ echo "Usage: $0 [--options]"
+ echo "Options:"
+ echo "--[no-]syms: enable or disable installation of debugging symbols"
+ echo "--[no-]gold: enable or disable installation of gold linker"
+ echo "--[no-]lib32: enable or disable installation of 32 bit libraries"
+ echo "Script will prompt interactively if options not given."
+ exit 1
+}
+
+while test "$1" != ""
+do
+ case "$1" in
+ --syms) do_inst_syms=1;;
+ --no-syms) do_inst_syms=0;;
+ --gold) do_inst_gold=1;;
+ --no-gold) do_inst_gold=0;;
+ --lib32) do_inst_lib32=1;;
+ --no-lib32) do_inst_lib32=0;;
+ *) usage;;
+ esac
+ shift
+done
+
install_gold() {
# Gold is optional; it's a faster replacement for ld,
# and makes life on 2GB machines much more pleasant.
@@ -172,13 +196,19 @@ yes_no() {
done
}
-echo "This script installs all tools and libraries needed to build Chromium."
-echo ""
-echo "For most of the libraries, it can also install debugging symbols, which"
-echo "will allow you to debug code in the system libraries. Most developers"
-echo "won't need these symbols."
-echo -n "Do you want me to install them for you (y/N) "
-if yes_no 1; then
+if test "$do_inst_syms" = ""
+then
+ echo "This script installs all tools and libraries needed to build Chromium."
+ echo ""
+ echo "For most of the libraries, it can also install debugging symbols, which"
+ echo "will allow you to debug code in the system libraries. Most developers"
+ echo "won't need these symbols."
+ echo -n "Do you want me to install them for you (y/N) "
+ if yes_no 1; then
+ do_inst_syms=1
+ fi
+fi
+if test "$do_inst_syms" = "1"; then
echo "Installing debugging symbols."
else
echo "Skipping installation of debugging symbols."
@@ -241,10 +271,17 @@ fi
case `ld --version` in
*gold*2.2*) ;;
* )
- echo "Gold is a new linker that links Chrome 5x faster than ld."
- echo "Don't use it if you need to link other apps (e.g. valgrind, wine)"
- echo -n "REPLACE SYSTEM LINKER ld with gold and back up ld? (y/N) "
- if yes_no 1; then
+ if test "$do_inst_gold" = ""
+ then
+ echo "Gold is a new linker that links Chrome 5x faster than ld."
+ echo "Don't use it if you need to link other apps (e.g. valgrind, wine)"
+ echo -n "REPLACE SYSTEM LINKER ld with gold and back up ld? (y/N) "
+ if yes_no 1; then
+ do_inst_gold=1
+ fi
+ fi
+ if test "$do_inst_gold" = "1"
+ then
# If the system provides gold, just install it.
if apt-cache show binutils-gold >/dev/null; then
echo "Installing binutils-gold. Backing up ld as ld.single."
@@ -261,18 +298,25 @@ esac
# Install 32bit backwards compatibility support for 64bit systems
if [ "$(uname -m)" = "x86_64" ]; then
- echo "Installing 32bit libraries that are not already provided by the system"
- echo
- echo "While we only need to install a relatively small number of library"
- echo "files, we temporarily need to download a lot of large *.deb packages"
- echo "that contain these files. We will create new *.deb packages that"
- echo "include just the 32bit libraries. These files will then be found on"
- echo "your system in places like /lib32, /usr/lib32, /usr/lib/debug/lib32,"
- echo "/usr/lib/debug/usr/lib32. If you ever need to uninstall these files,"
- echo "look for packages named *-ia32.deb."
- echo "Do you want me to download all packages needed to build new 32bit"
- echo -n "package files (Y/n) "
- if ! yes_no 0; then
+ if test "$do_inst_lib32" = ""
+ then
+ echo "Installing 32bit libraries not already provided by the system"
+ echo
+ echo "While we only need to install a relatively small number of library"
+ echo "files, we temporarily need to download a lot of large *.deb packages"
+ echo "that contain these files. We will create new *.deb packages that"
+ echo "include just the 32bit libraries. These files will then be found on"
+ echo "your system in places like /lib32, /usr/lib32, /usr/lib/debug/lib32,"
+ echo "/usr/lib/debug/usr/lib32. If you ever need to uninstall these files,"
+ echo "look for packages named *-ia32.deb."
+ echo "Do you want me to download all packages needed to build new 32bit"
+ echo -n "package files (Y/n) "
+ if ! yes_no 0; then
+ do_inst_lib32=1
+ fi
+ fi
+ if test "$do_inst_lib32" != "1"
+ then
echo "Exiting without installing any 32bit libraries."
exit 0
fi