michael@0: # Usage: sh update.sh michael@0: set -e michael@0: echo "copy source from libvpx" michael@0: michael@0: cp $1/third_party/libmkv/EbmlBufferWriter.c . michael@0: cp $1/third_party/libmkv/WebMElement.c . michael@0: cp $1/third_party/libmkv/EbmlWriter.c . michael@0: cp $1/third_party/libmkv/EbmlWriter.h . michael@0: cp $1/third_party/libmkv/EbmlBufferWriter.h . michael@0: cp $1/third_party/libmkv/WebMElement.h . michael@0: cp $1/third_party/libmkv/EbmlIDs.h . michael@0: michael@0: cp $1/LICENSE . michael@0: cp $1/README . michael@0: cp $1/AUTHORS . michael@0: if [ -d $1/.git ]; then michael@0: rev=$(cd $1 && git rev-parse --verify HEAD) michael@0: dirty=$(cd $1 && git diff-index --name-only HEAD) michael@0: fi michael@0: michael@0: if [ -n "$rev" ]; then michael@0: version=$rev michael@0: if [ -n "$dirty" ]; then michael@0: version=$version-dirty michael@0: echo "WARNING: updating from a dirty git repository." michael@0: fi michael@0: sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA michael@0: rm README_MOZILLA.bak michael@0: else michael@0: echo "Remember to update README_MOZILLA with the version details." michael@0: fi michael@0: michael@0: # Apply any patches against upstream here. michael@0: patch -p1 < source_fix.patch michael@0: patch -p1 < gecko_fix.patch michael@0: patch -p1 < const_fix.patch michael@0: patch -p3 < bock_fix.patch michael@0: patch -p3 < bug970774.patch