|
1 # Usage: ./update.sh [blink-core-source-directory] |
|
2 # |
|
3 # Copies the needed files from a directory containing the original |
|
4 # Decimal.h and Decimal.cpp source that we need. |
|
5 # If [blink-core-source-directory] is not specified, this script will |
|
6 # attempt to download the latest versions using svn. |
|
7 |
|
8 # This was last updated with svn r148833 |
|
9 |
|
10 set -e |
|
11 |
|
12 FILES=( |
|
13 "LICENSE-APPLE" |
|
14 "LICENSE-LGPL-2" |
|
15 "LICENSE-LGPL-2.1" |
|
16 "platform/Decimal.h" |
|
17 "platform/Decimal.cpp" |
|
18 ) |
|
19 |
|
20 OWN_NAME=`basename $0` |
|
21 |
|
22 if [ $# -gt 1 ]; then |
|
23 echo "$OWN_NAME: Too many arguments">&2 |
|
24 exit 1 |
|
25 fi |
|
26 |
|
27 if [ $# -eq 1 ]; then |
|
28 BLINK_CORE_DIR="$1" |
|
29 for F in "${FILES[@]}" |
|
30 do |
|
31 P="$BLINK_CORE_DIR/$F" |
|
32 if [ ! -f "$P" ]; then |
|
33 echo "$OWN_NAME: Couldn't find file: $P">&2 |
|
34 exit 1 |
|
35 fi |
|
36 done |
|
37 for F in "${FILES[@]}" |
|
38 do |
|
39 P="$BLINK_CORE_DIR/$F" |
|
40 cp "$P" . |
|
41 done |
|
42 else |
|
43 SVN="svn --non-interactive --trust-server-cert" |
|
44 REPO_PATH="https://src.chromium.org/blink/trunk/Source/core" |
|
45 #REPO_PATH="https://svn.webkit.org/repository/webkit/trunk/Source/WebCore" |
|
46 |
|
47 printf "Looking up latest Blink revision number..." |
|
48 LATEST_REV=`$SVN info $REPO_PATH | grep '^Revision: ' | cut -c11-` |
|
49 echo done. |
|
50 |
|
51 for F in "${FILES[@]}" |
|
52 do |
|
53 printf "Exporting r$LATEST_REV of `basename $F`..." |
|
54 $SVN export -r $LATEST_REV $REPO_PATH/$F 2>/dev/null 1>&2 |
|
55 echo done. |
|
56 done |
|
57 fi |
|
58 |
|
59 # Apply patches: |
|
60 |
|
61 patch -p3 < floor-ceiling.patch |
|
62 patch -p3 < zero-serialization.patch |
|
63 patch -p3 < comparison-with-nan.patch |
|
64 patch -p3 < mfbt-abi-markers.patch |
|
65 patch -p3 < to-moz-dependencies.patch |
|
66 |