blob: 4dafa4d167490970230cb9de9e87c80fdc16c320 [file] [log] [blame]
rmistry@google.com6b69cbf2013-01-08 14:43:40 +00001#!/bin/bash
2#
3# Author: Ravi Mistry
4#
5# Script to checkout and build a fresh copy of Chromium from head that uses a
6# writable, tip-of-tree Skia rather than the read-only, revision-locked Skia
7# specified in http://src.chromium.org/viewvc/chrome/trunk/src/DEPS
8#
9# Sample Usage:
10# tools/build-tot-chromium.sh ~/chromiumtrunk
11
12if [[ $# -ne 1 ]] ; then
13 echo "usage: $0 chromium_location"
14 exit 1
15fi
16CHROMIUM_LOCATION=$1
17
18echo -e "\n\n========Deleting $CHROMIUM_LOCATION========\n\n"
19rm -rf $CHROMIUM_LOCATION
20
21mkdir $CHROMIUM_LOCATION
22cd $CHROMIUM_LOCATION
23gclient config https://src.chromium.org/chrome/trunk/src
24echo '
25solutions = [
26 { "name" : "src",
27 "url" : "https://src.chromium.org/chrome/trunk/src",
28 "deps_file" : "DEPS",
29 "managed" : True,
30 "custom_deps" : {
31 "src/third_party/skia": "https://skia.googlecode.com/svn/trunk",
32 "src/third_party/skia/gyp": None,
33 "src/third_party/skia/src": None,
34 "src/third_party/skia/include": None,
35 },
rmistry@google.com76d11922013-07-11 11:28:41 +000036 "safesync_url": "http://chromium-status.appspot.com/lkgr",
rmistry@google.com6b69cbf2013-01-08 14:43:40 +000037 },
38]
39' > .gclient
40
41echo -e "\n\n========Starting gclient sync========\n\n"
42START_TIME=$SECONDS
43gclient sync
44END_TIME=$SECONDS
45echo -e "\n\n========gclient sync took $((END_TIME - START_TIME)) seconds========\n\n"
46
47cd src
48rm -rf out/Debug out/Release
49GYP_GENERATORS='ninja' ./build/gyp_chromium
50
51echo -e "\n\n========Starting ninja build========\n\n"
52START_TIME=$SECONDS
53ninja -C out/Release chrome
54END_TIME=$SECONDS
55echo -e "\n\n========ninja build took $((END_TIME - START_TIME)) seconds========\n\n"
56
57SVN_VERSION=`svnversion .`
rmistry@google.com7492f4e2013-01-08 15:56:15 +000058echo -e "\n\n========The Chromium & Skia versions are $SVN_VERSION========\n\n"
rmistry@google.com6b69cbf2013-01-08 14:43:40 +000059