michael@0: # Usage: ./update.sh [blink-core-source-directory] michael@0: # michael@0: # Copies the needed files from a directory containing the original michael@0: # Decimal.h and Decimal.cpp source that we need. michael@0: # If [blink-core-source-directory] is not specified, this script will michael@0: # attempt to download the latest versions using svn. michael@0: michael@0: # This was last updated with svn r148833 michael@0: michael@0: set -e michael@0: michael@0: FILES=( michael@0: "LICENSE-APPLE" michael@0: "LICENSE-LGPL-2" michael@0: "LICENSE-LGPL-2.1" michael@0: "platform/Decimal.h" michael@0: "platform/Decimal.cpp" michael@0: ) michael@0: michael@0: OWN_NAME=`basename $0` michael@0: michael@0: if [ $# -gt 1 ]; then michael@0: echo "$OWN_NAME: Too many arguments">&2 michael@0: exit 1 michael@0: fi michael@0: michael@0: if [ $# -eq 1 ]; then michael@0: BLINK_CORE_DIR="$1" michael@0: for F in "${FILES[@]}" michael@0: do michael@0: P="$BLINK_CORE_DIR/$F" michael@0: if [ ! -f "$P" ]; then michael@0: echo "$OWN_NAME: Couldn't find file: $P">&2 michael@0: exit 1 michael@0: fi michael@0: done michael@0: for F in "${FILES[@]}" michael@0: do michael@0: P="$BLINK_CORE_DIR/$F" michael@0: cp "$P" . michael@0: done michael@0: else michael@0: SVN="svn --non-interactive --trust-server-cert" michael@0: REPO_PATH="https://src.chromium.org/blink/trunk/Source/core" michael@0: #REPO_PATH="https://svn.webkit.org/repository/webkit/trunk/Source/WebCore" michael@0: michael@0: printf "Looking up latest Blink revision number..." michael@0: LATEST_REV=`$SVN info $REPO_PATH | grep '^Revision: ' | cut -c11-` michael@0: echo done. michael@0: michael@0: for F in "${FILES[@]}" michael@0: do michael@0: printf "Exporting r$LATEST_REV of `basename $F`..." michael@0: $SVN export -r $LATEST_REV $REPO_PATH/$F 2>/dev/null 1>&2 michael@0: echo done. michael@0: done michael@0: fi michael@0: michael@0: # Apply patches: michael@0: michael@0: patch -p3 < floor-ceiling.patch michael@0: patch -p3 < zero-serialization.patch michael@0: patch -p3 < comparison-with-nan.patch michael@0: patch -p3 < mfbt-abi-markers.patch michael@0: patch -p3 < to-moz-dependencies.patch michael@0: