update-elf.bash 634 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. set -e
  3. set -x
  4. shopt -s dotglob
  5. readonly name="elf"
  6. readonly ownership="FreeBSD Upstream <[email protected]>"
  7. readonly subtree="Utilities/cmelf"
  8. readonly repo="https://github.com/freebsd/freebsd-src.git"
  9. readonly tag="main"
  10. readonly shortlog=false
  11. readonly paths="
  12. sys/sys/elf32.h
  13. sys/sys/elf64.h
  14. sys/sys/elf_common.h
  15. "
  16. extract_source () {
  17. git_archive
  18. pushd "${extractdir}/${name}-reduced"
  19. echo "* -whitespace" > .gitattributes
  20. mv sys/sys/* .
  21. sed -i -e 's/<sys\/elf_common.h>/"elf_common.h"/g' -e 's/u_int32_t/uint32_t/g' *.h
  22. popd
  23. }
  24. . "${BASH_SOURCE%/*}/update-third-party.bash"