mfbt/decimal/update.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mfbt/decimal/update.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,66 @@
     1.4 +# Usage: ./update.sh [blink-core-source-directory]
     1.5 +#
     1.6 +# Copies the needed files from a directory containing the original
     1.7 +# Decimal.h and Decimal.cpp source that we need.
     1.8 +# If [blink-core-source-directory] is not specified, this script will
     1.9 +# attempt to download the latest versions using svn.
    1.10 +
    1.11 +# This was last updated with svn r148833
    1.12 +
    1.13 +set -e
    1.14 +
    1.15 +FILES=(
    1.16 +  "LICENSE-APPLE"
    1.17 +  "LICENSE-LGPL-2"
    1.18 +  "LICENSE-LGPL-2.1"
    1.19 +  "platform/Decimal.h"
    1.20 +  "platform/Decimal.cpp"
    1.21 +)
    1.22 +
    1.23 +OWN_NAME=`basename $0`
    1.24 +
    1.25 +if [ $# -gt 1 ]; then
    1.26 +  echo "$OWN_NAME: Too many arguments">&2
    1.27 +  exit 1
    1.28 +fi
    1.29 +
    1.30 +if [ $# -eq 1 ]; then
    1.31 +  BLINK_CORE_DIR="$1"
    1.32 +  for F in "${FILES[@]}"
    1.33 +  do
    1.34 +    P="$BLINK_CORE_DIR/$F"
    1.35 +    if [ ! -f "$P" ]; then
    1.36 +      echo "$OWN_NAME: Couldn't find file: $P">&2
    1.37 +      exit 1
    1.38 +    fi
    1.39 +  done
    1.40 +  for F in "${FILES[@]}"
    1.41 +  do
    1.42 +    P="$BLINK_CORE_DIR/$F"
    1.43 +    cp "$P" .
    1.44 +  done
    1.45 +else
    1.46 +  SVN="svn --non-interactive --trust-server-cert"
    1.47 +  REPO_PATH="https://src.chromium.org/blink/trunk/Source/core"
    1.48 +  #REPO_PATH="https://svn.webkit.org/repository/webkit/trunk/Source/WebCore"
    1.49 +
    1.50 +  printf "Looking up latest Blink revision number..."
    1.51 +  LATEST_REV=`$SVN info $REPO_PATH | grep '^Revision: ' | cut -c11-`
    1.52 +  echo done.
    1.53 +
    1.54 +  for F in "${FILES[@]}"
    1.55 +  do
    1.56 +    printf "Exporting r$LATEST_REV of `basename $F`..."
    1.57 +    $SVN export -r $LATEST_REV $REPO_PATH/$F 2>/dev/null 1>&2
    1.58 +    echo done.
    1.59 +  done
    1.60 +fi
    1.61 +
    1.62 +# Apply patches:
    1.63 +
    1.64 +patch -p3 < floor-ceiling.patch
    1.65 +patch -p3 < zero-serialization.patch
    1.66 +patch -p3 < comparison-with-nan.patch
    1.67 +patch -p3 < mfbt-abi-markers.patch
    1.68 +patch -p3 < to-moz-dependencies.patch
    1.69 +

mercurial