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 .
|
|
|
|
|
|
|
|
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
|