mfbt/decimal/update.sh

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rwxr-xr-x

Integrate suggestion from review to improve consistency with existing code.

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

mercurial