| Index: build/bootstrap-linux.sh
|
| ===================================================================
|
| --- build/bootstrap-linux.sh (revision 0)
|
| +++ build/bootstrap-linux.sh (revision 0)
|
| @@ -0,0 +1,70 @@
|
| +#!/bin/sh
|
| +#
|
| +# Set up a Chromium source tree in ~/chromium, and
|
| +# install the packages needed to hack productively
|
| +# on Chromium.
|
| +set -e
|
| +set -x
|
| +
|
| +CHROME_DIR="$HOME/chromium"
|
| +
|
| +check_distro() {
|
| + if ! uname -m | egrep -q "i686|x86_64"; then
|
| + echo "Only x86 and x86_64 architectures are currently supported" >&2
|
| + exit
|
| + fi
|
| + if ! egrep -q "Ubuntu 8.04|Ubuntu 8.10|Ubuntu 9.04" /etc/issue; then
|
| + echo "Only Ubuntu 8.04, 8.10, and 9.04 are currently supported" >&2
|
| + exit 1
|
| + fi
|
| +}
|
| +
|
| +install_build_deps() {
|
| + # FIXME: can't use https, the certificate doesn't match :-(
|
| + wget http://src.chromium.org/svn/trunk/src/build/install-build-deps.sh
|
| + # This step will prompt for your password, and assumes you're in sudoers.
|
| + # FIXME: It really isn't safe to execute scripts downloaded like this...
|
| + bash install-build-deps.sh
|
| +}
|
| +
|
| +create_workspace() {
|
| + echo "Using $CHROME_DIR for data."
|
| + mkdir -p "$CHROME_DIR"
|
| +}
|
| +
|
| +install_depot_tools() {
|
| + cd "$CHROME_DIR"
|
| + if [ -e depot_tools ]; then
|
| + echo "Looks like depot_tools is already installed; skipping."
|
| + return 0
|
| + fi
|
| + echo "Checking out depot_tools..."
|
| + svn co http://src.chromium.org/svn/trunk/depot_tools/linux depot_tools
|
| +}
|
| +
|
| +check_out_source() {
|
| + use_git=
|
| +
|
| + cd "$CHROME_DIR"
|
| +
|
| + if [ ! -e .gclient ]; then
|
| + echo "Configuring gclient..."
|
| + ./depot_tools/gclient config http://src.chromium.org/svn/trunk/src
|
| +
|
| + # Exclude layout tests from .gclient file.
|
| + sed -i -e '/^\s+"custom_deps"/{n;i\
|
| + "src/webkit/data/layout_tests/LayoutTests": None,
|
| +}' .gclient
|
| + fi
|
| +
|
| + echo "Getting/updating source. This might take a while..."
|
| + # Retry a few times in case of network trouble (not uncommon)
|
| + ./depot_tools/gclient sync ||
|
| + ./depot_tools/gclient sync ||
|
| + ./depot_tools/gclient sync || echo "Hmm, gclient sync hit network trouble?"
|
| +}
|
| +
|
| +install_build_deps
|
| +create_workspace
|
| +install_depot_tools
|
| +check_out_source
|
|
|