update.sh 1.1 KB

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