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

Unified Diff: build/bootstrap-linux.sh

Issue 115140: Add script to check out chromium source tree and invoke install-build-deps.sh... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/install-build-deps.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | build/install-build-deps.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698