|
1 # Usage: sh update.sh <upstream_src_directory> |
|
2 set -e |
|
3 echo "copy source from libvpx" |
|
4 |
|
5 cp $1/third_party/libmkv/EbmlBufferWriter.c . |
|
6 cp $1/third_party/libmkv/WebMElement.c . |
|
7 cp $1/third_party/libmkv/EbmlWriter.c . |
|
8 cp $1/third_party/libmkv/EbmlWriter.h . |
|
9 cp $1/third_party/libmkv/EbmlBufferWriter.h . |
|
10 cp $1/third_party/libmkv/WebMElement.h . |
|
11 cp $1/third_party/libmkv/EbmlIDs.h . |
|
12 |
|
13 cp $1/LICENSE . |
|
14 cp $1/README . |
|
15 cp $1/AUTHORS . |
|
16 if [ -d $1/.git ]; then |
|
17 rev=$(cd $1 && git rev-parse --verify HEAD) |
|
18 dirty=$(cd $1 && git diff-index --name-only HEAD) |
|
19 fi |
|
20 |
|
21 if [ -n "$rev" ]; then |
|
22 version=$rev |
|
23 if [ -n "$dirty" ]; then |
|
24 version=$version-dirty |
|
25 echo "WARNING: updating from a dirty git repository." |
|
26 fi |
|
27 sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA |
|
28 rm README_MOZILLA.bak |
|
29 else |
|
30 echo "Remember to update README_MOZILLA with the version details." |
|
31 fi |
|
32 |
|
33 # Apply any patches against upstream here. |
|
34 patch -p1 < source_fix.patch |
|
35 patch -p1 < gecko_fix.patch |
|
36 patch -p1 < const_fix.patch |
|
37 patch -p3 < bock_fix.patch |
|
38 patch -p3 < bug970774.patch |