]>
Commit | Line | Data |
---|---|---|
e6c6c1d9 AM |
1 | #!/bin/sh |
2 | ||
42cc2c8c | 3 | # based on debian/rules for chromium-browser package |
e6c6c1d9 AM |
4 | |
5 | set -e | |
6 | set -x | |
7 | ||
8 | CHANNEL="beta" | |
9 | # See Staying Green More Of The Time at http://dev.chromium.org/developers/how-tos/get-the-code | |
10 | USE_GREEN_REV=1 | |
11 | ||
12 | GCLIENT_URL="http://src.chromium.org/svn/trunk/tools/depot_tools" | |
13 | CHROMIUM_URL="http://src.chromium.org/svn/trunk/src" | |
14 | CHROMIUM_RLZ="http://src.chromium.org/svn/releases" | |
15 | DEPS_URL="http://src.chromium.org/svn/trunk/deps/third_party" | |
16 | GREEN_REV_URL="http://chromium-status.appspot.com/lkgr" | |
17 | CHANNELS_URL="http://omahaproxy.appspot.com/" | |
18 | ||
19 | CHANNEL="beta" | |
20 | ||
42cc2c8c ER |
21 | # local mirror of chromium checkout, |
22 | # if empty code will be checked out each time | |
23 | LOCAL_BRANCH=$(pwd)/chromium-browser | |
24 | ||
25 | TMP_DDIR=$(pwd)/chromium-browser-$$ | |
26 | TMP_DIR=${LOCAL_BRANCH:-${TMP_DDIR}} | |
e6c6c1d9 AM |
27 | |
28 | VERSION=$(wget -qO - "$CHANNELS_URL" | grep -i "^linux,${CHANNEL}" | cut -d, -f3) | |
29 | ||
42cc2c8c ER |
30 | if [ -z "$LOCAL_BRANCH" ]; then |
31 | rm -rf $TMP_DIR | |
32 | fi | |
e6c6c1d9 | 33 | |
e6c6c1d9 | 34 | install -d $TMP_DIR |
42cc2c8c ER |
35 | |
36 | if [ ! -d $TMP_DIR/tools/depot_tools ] ; then \ | |
37 | svn co "$GCLIENT_URL" $TMP_DIR/tools/depot_tools | |
38 | else | |
39 | svn update $TMP_DIR/tools/depot_tools | |
40 | fi | |
41 | ||
e6c6c1d9 AM |
42 | cd $TMP_DIR |
43 | if [ "$USE_GREEN_REV" -eq 1 ]; then | |
44 | REVISION=$(wget -qO - "${GREEN_REV_URL}") | |
45 | ./tools/depot_tools/gclient config "${CHROMIUM_URL}" "${GREEN_REV_URL}" | |
46 | else | |
47 | REVISION=101024 | |
48 | ./tools/depot_tools/gclient config "${CHROMIUM_URL}" | |
49 | fi | |
50 | ||
51 | REVISION="--revision src@${REVISION}" | |
52 | ||
53 | cd $TMP_DIR | |
54 | ./tools/depot_tools/gclient update --nohooks ${REVISION} | |
55 | ||
56 | cd $TMP_DIR | |
57 | SDIR=`grep '"name"' .gclient | cut -d\" -f4` | |
58 | perl -i~ -pe 's%(.python., .src/build/gyp_chromium.)%"echo", "#disabled#", $1%' $SDIR/DEPS | |
59 | ./tools/depot_tools/gclient runhooks | |
60 | mv $SDIR/DEPS~ $SDIR/DEPS | |
61 | ||
42cc2c8c ER |
62 | if [ -n "$LOCAL_BRANCH" ]; then |
63 | rm -rf $TMP_DDIR | |
64 | cp -la $TMP_DIR $TMP_DDIR | |
65 | fi | |
e6c6c1d9 | 66 | |
42cc2c8c ER |
67 | cd $TMP_DDIR/src && find . -type f \( -iname \*.exe -o -iname \*.dll -o -iname \*.pdb -o -name \*.o -o -name \*.a -o -name \*.dylib \) -exec rm -fv {} \; > REMOVED-bin_only.txt |
68 | wc -l $TMP_DDIR/src/REMOVED-*.txt | |
e6c6c1d9 | 69 | |
42cc2c8c | 70 | TMP_DIR=$TMP_DDIR |