gecko-dev/mfbt/double-conversion/update.sh

55 строки
1.3 KiB
Bash
Исходник Обычный вид История

# Usage: ./update.sh [<git-rev-to-use>]
#
# Copies the needed files from a directory containing the original
# double-conversion source that we need. If no revision is specified, the tip
# revision is used.
# This was last updated with git rev d8d4e668ee1e6e10b728f0671a89b07d7c4d45be.
set -e
LOCAL_PATCHES=""
LOCAL_PATCHES="$LOCAL_PATCHES add-mfbt-api-markers.patch"
LOCAL_PATCHES="$LOCAL_PATCHES use-StandardInteger.patch"
LOCAL_PATCHES="$LOCAL_PATCHES use-mozilla-assertions.patch"
LOCAL_PATCHES="$LOCAL_PATCHES ToPrecision-exponential.patch"
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
# First clear out everything already present.
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
DEST=./source
rm -rf "$DEST"
mkdir "$DEST"
# Copy over critical files.
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
cp "$LOCAL_CLONE/LICENSE" "$DEST/"
cp "$LOCAL_CLONE/README.md" "$DEST/"
# Includes
for header in "$LOCAL_CLONE/double-conversion/"*.h; do
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
cp "$header" "$DEST/"
done
# Source
for ccfile in "$LOCAL_CLONE/double-conversion/"*.cc; do
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
cp "$ccfile" "$DEST/"
done
# Now apply our local patches.
for patch in $LOCAL_PATCHES; do
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
patch --directory "$DEST" --strip 4 < "$patch"
done
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj --HG-- rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-24 02:11:50 +03:00
# Update Mercurial file status.
hg addremove "$DEST"