Skip to content

Commit

Permalink
Bug 854531, part 2 - Add update.sh script to mfbt/decimal/. r=Waldo
Browse files Browse the repository at this point in the history
  • Loading branch information
jwatt committed May 5, 2013
1 parent acef3bb commit caefe71
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions mfbt/decimal/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Usage: ./update.sh [blink-core-source-directory]
#
# Copies the needed files from a directory containing the original
# Decimal.h and Decimal.cpp source that we need.
# If [blink-core-source-directory] is not specified, this script will
# attempt to download the latest versions using svn.

# This was last updated with svn r148833

set -e

FILES=(
"LICENSE-APPLE"
"LICENSE-LGPL-2"
"LICENSE-LGPL-2.1"
"platform/Decimal.h"
"platform/Decimal.cpp"
)

OWN_NAME=`basename $0`

if [ $# -gt 1 ]; then
echo "$OWN_NAME: Too many arguments">&2
exit 1
fi

if [ $# -eq 1 ]; then
BLINK_CORE_DIR="$1"
for F in "${FILES[@]}"
do
P="$BLINK_CORE_DIR/$F"
if [ ! -f "$P" ]; then
echo "$OWN_NAME: Couldn't find file: $P">&2
exit 1
fi
done
for F in "${FILES[@]}"
do
P="$BLINK_CORE_DIR/$F"
cp "$P" .
done
else
SVN="svn --non-interactive --trust-server-cert"
REPO_PATH="https://src.chromium.org/blink/trunk/Source/core"
#REPO_PATH="https://svn.webkit.org/repository/webkit/trunk/Source/WebCore"

printf "Looking up latest Blink revision number..."
LATEST_REV=`$SVN info $REPO_PATH | grep '^Revision: ' | cut -c11-`
echo done.

for F in "${FILES[@]}"
do
printf "Exporting r$LATEST_REV of `basename $F`..."
$SVN export -r $LATEST_REV $REPO_PATH/$F 2>/dev/null 1>&2
echo done.
done
fi

# Apply patches:


0 comments on commit caefe71

Please sign in to comment.