| OLD | NEW |
| (Empty) | |
| 1 #!/bin/sh |
| 2 # |
| 3 # Set up a Chromium source tree in ~/chromium, and |
| 4 # install the packages needed to hack productively |
| 5 # on Chromium. |
| 6 set -e |
| 7 set -x |
| 8 |
| 9 CHROME_DIR="$HOME/chromium" |
| 10 |
| 11 check_distro() { |
| 12 if ! uname -m | egrep -q "i686|x86_64"; then |
| 13 echo "Only x86 and x86_64 architectures are currently supported" >&2 |
| 14 exit |
| 15 fi |
| 16 if ! egrep -q "Ubuntu 8.04|Ubuntu 8.10|Ubuntu 9.04" /etc/issue; then |
| 17 echo "Only Ubuntu 8.04, 8.10, and 9.04 are currently supported" >&2 |
| 18 exit 1 |
| 19 fi |
| 20 } |
| 21 |
| 22 install_build_deps() { |
| 23 # FIXME: can't use https, the certificate doesn't match :-( |
| 24 wget http://src.chromium.org/svn/trunk/src/build/install-build-deps.sh |
| 25 # This step will prompt for your password, and assumes you're in sudoers. |
| 26 # FIXME: It really isn't safe to execute scripts downloaded like this... |
| 27 bash install-build-deps.sh |
| 28 } |
| 29 |
| 30 create_workspace() { |
| 31 echo "Using $CHROME_DIR for data." |
| 32 mkdir -p "$CHROME_DIR" |
| 33 } |
| 34 |
| 35 install_depot_tools() { |
| 36 cd "$CHROME_DIR" |
| 37 if [ -e depot_tools ]; then |
| 38 echo "Looks like depot_tools is already installed; skipping." |
| 39 return 0 |
| 40 fi |
| 41 echo "Checking out depot_tools..." |
| 42 svn co http://src.chromium.org/svn/trunk/depot_tools/linux depot_tools |
| 43 } |
| 44 |
| 45 check_out_source() { |
| 46 use_git= |
| 47 |
| 48 cd "$CHROME_DIR" |
| 49 |
| 50 if [ ! -e .gclient ]; then |
| 51 echo "Configuring gclient..." |
| 52 ./depot_tools/gclient config http://src.chromium.org/svn/trunk/src |
| 53 |
| 54 # Exclude layout tests from .gclient file. |
| 55 sed -i -e '/^\s+"custom_deps"/{n;i\ |
| 56 "src/webkit/data/layout_tests/LayoutTests": None, |
| 57 }' .gclient |
| 58 fi |
| 59 |
| 60 echo "Getting/updating source. This might take a while..." |
| 61 # Retry a few times in case of network trouble (not uncommon) |
| 62 ./depot_tools/gclient sync || |
| 63 ./depot_tools/gclient sync || |
| 64 ./depot_tools/gclient sync || echo "Hmm, gclient sync hit network trouble?" |
| 65 } |
| 66 |
| 67 install_build_deps |
| 68 create_workspace |
| 69 install_depot_tools |
| 70 check_out_source |
| OLD | NEW |