2014-08-23 09:58:00 +04: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 11:43:30 +04:00
|
|
|
ls | fgrep -v moz.build | xargs rm -rf
|
2014-08-23 09:58:00 +04:00
|
|
|
cp -r $1/src/* .
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Updating include..."
|
|
|
|
rm -rf include/
|
|
|
|
cp -r $1/include .
|
|
|
|
|
2017-07-26 23:09:18 +03:00
|
|
|
echo "Updating tests..."
|
|
|
|
rm -rf tests/*
|
|
|
|
mkdir -p tests
|
|
|
|
cp -r $1/tests/*.cc tests
|
|
|
|
|
2014-08-23 09:58:00 +04:00
|
|
|
echo "Updating README.mozilla..."
|
|
|
|
REVISION=`cd $1; git log | head -1 | sed "s/commit //"`
|
2017-02-23 01:34:25 +03: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 06:21:45 +03:00
|
|
|
mv README.tmp README.mozilla
|
2014-08-23 09:58:00 +04:00
|
|
|
|
|
|
|
echo "Applying ots-visibility.patch..."
|
|
|
|
patch -p3 < ots-visibility.patch
|
2017-07-27 11:03:10 +03:00
|
|
|
|
2017-08-12 02:36:12 +03:00
|
|
|
echo "Applying ots-lz4.patch..."
|
|
|
|
patch -p3 < ots-lz4.patch
|