2017-01-23 22:27:01 +03:00
|
|
|
# Usage: ./update.sh [<git-rev-to-use>]
|
2012-03-19 20:21:05 +04:00
|
|
|
#
|
|
|
|
# Copies the needed files from a directory containing the original
|
2017-01-23 22:27:01 +03:00
|
|
|
# double-conversion source that we need. If no revision is specified, the tip
|
|
|
|
# revision is used.
|
2012-03-19 20:21:05 +04:00
|
|
|
|
2013-06-28 03:25:32 +04:00
|
|
|
# This was last updated with git rev 04cae7a8d5ef3d62ceffb03cdc3d38f258457a52.
|
2012-10-30 23:30:08 +04:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2017-01-23 22:27:01 +03:00
|
|
|
TMPDIR=`mktemp --directory`
|
|
|
|
LOCAL_CLONE="$TMPDIR/double-conversion"
|
|
|
|
|
|
|
|
git clone https://github.com/google/double-conversion.git "$LOCAL_CLONE"
|
|
|
|
|
|
|
|
REV=""
|
|
|
|
|
|
|
|
if [ "$1" != "" ]; then
|
|
|
|
git -C "$LOCAL_CLONE" checkout "$1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp "$LOCAL_CLONE/LICENSE" ./
|
|
|
|
cp "$LOCAL_CLONE/README" ./
|
2012-03-19 20:21:05 +04:00
|
|
|
|
|
|
|
# Includes
|
2017-01-23 22:27:01 +03:00
|
|
|
for header in "$LOCAL_CLONE/src/"*.h; do
|
|
|
|
cp "$header" ./
|
|
|
|
done
|
2012-03-19 20:21:05 +04:00
|
|
|
|
|
|
|
# Source
|
2017-01-23 22:27:01 +03:00
|
|
|
for ccfile in "$LOCAL_CLONE/src/"*.cc; do
|
|
|
|
cp "$ccfile" ./
|
|
|
|
done
|
2012-03-19 20:21:05 +04:00
|
|
|
|
|
|
|
patch -p3 < add-mfbt-api-markers.patch
|
2012-04-27 13:40:05 +04:00
|
|
|
patch -p3 < use-StandardInteger.patch
|
2013-06-28 03:25:42 +04:00
|
|
|
patch -p3 < use-mozilla-assertions.patch
|
2013-09-30 08:18:26 +04:00
|
|
|
patch -p3 < use-static_assert.patch
|
2014-02-26 22:43:16 +04:00
|
|
|
patch -p3 < ToPrecision-exponential.patch
|
2017-01-23 22:27:01 +03:00
|
|
|
patch -p3 < fix-Wshadow-issues.patch
|