2014-08-23 05:58:00 +00:00
|
|
|
# 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
|
2014-10-09 07:43:30 +00:00
|
|
|
ls | fgrep -v moz.build | xargs rm -rf
|
2014-08-23 05:58:00 +00:00
|
|
|
cp -r $1/src/* .
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Updating include..."
|
|
|
|
rm -rf include/
|
|
|
|
cp -r $1/include .
|
|
|
|
|
2017-07-26 20:09:18 +00:00
|
|
|
echo "Updating tests..."
|
|
|
|
rm -rf tests/*
|
|
|
|
mkdir -p tests
|
|
|
|
cp -r $1/tests/*.cc tests
|
|
|
|
|
2014-08-23 05:58:00 +00:00
|
|
|
echo "Updating README.mozilla..."
|
|
|
|
REVISION=`cd $1; git log | head -1 | sed "s/commit //"`
|
2017-02-22 22:34:25 +00:00
|
|
|
VERSION=`cd $1; git describe | cut -d '-' -f 1 | sed 's/v//'`
|
|
|
|
sed -e "s/\(Current revision: \).*/\1$REVISION \($VERSION\)/" README.mozilla > README.tmp
|
2015-10-02 03:21:45 +00:00
|
|
|
mv README.tmp README.mozilla
|
2014-08-23 05:58:00 +00:00
|
|
|
|
|
|
|
echo "Applying ots-visibility.patch..."
|
|
|
|
patch -p3 < ots-visibility.patch
|
2017-07-27 08:03:10 +00:00
|
|
|
|
2017-08-11 23:36:12 +00:00
|
|
|
echo "Applying ots-lz4.patch..."
|
|
|
|
patch -p3 < ots-lz4.patch
|