update-elf.bash 666 B

1234567891011121314151617181920212223242526272829
  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 exact_tree_match=false
  12. readonly paths="
  13. sys/sys/elf32.h
  14. sys/sys/elf64.h
  15. sys/sys/elf_common.h
  16. "
  17. extract_source () {
  18. git_archive
  19. pushd "${extractdir}/${name}-reduced"
  20. echo "* -whitespace" > .gitattributes
  21. mv sys/sys/* .
  22. sed -i -e 's/<sys\/elf_common.h>/"elf_common.h"/g' -e 's/u_int32_t/uint32_t/g' *.h
  23. popd
  24. }
  25. . "${BASH_SOURCE%/*}/update-third-party.bash"