gfx/ots/sync.sh
author Ryan VanderMeulen <ryanvm@gmail.com>
Fri, 01 Sep 2017 15:37:08 -0400
changeset 430269 1d02aa80f2f8c283428f0a8a6310e7d1fec3936c
parent 427453 5b228a65aa8b11ccd5bab4b208167f180a789b44
permissions -rwxr-xr-x
Backed out 9 changesets (bug 1383880) for decision task bustage. Backed out changeset 53f5d47a7cb0 (bug 1383880) Backed out changeset a0abda41172a (bug 1383880) Backed out changeset 729a7e2091e8 (bug 1383880) Backed out changeset a33f5a14a471 (bug 1383880) Backed out changeset 5b10d321cfee (bug 1383880) Backed out changeset 8056488d8aed (bug 1383880) Backed out changeset e62c90e3c1e8 (bug 1383880) Backed out changeset 91f116ce6c2a (bug 1383880) Backed out changeset 045498bc36c4 (bug 1383880)

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

if [ $# = 0 ] ; then
    echo "usage: ./sync.sh ots-git-directory"
    exit 1
fi

echo "Updating LICENSE..."
cp $1/LICENSE .

echo "Updating src..."
cd src
ls | fgrep -v moz.build | xargs rm -rf
cp -r $1/src/* .
cd ..

echo "Updating include..."
rm -rf include/
cp -r $1/include .

echo "Updating tests..."
rm -rf tests/*
mkdir -p tests
cp -r $1/tests/*.cc tests

echo "Updating README.mozilla..."
REVISION=`cd $1; git log | head -1 | sed "s/commit //"`
VERSION=`cd $1; git describe | cut -d '-' -f 1 | sed 's/v//'`
sed -e "s/\(Current revision: \).*/\1$REVISION \($VERSION\)/" README.mozilla > README.tmp
mv README.tmp README.mozilla

echo "Applying ots-visibility.patch..."
patch -p3 < ots-visibility.patch

echo "Applying ots-lz4.patch..."
patch -p3 < ots-lz4.patch