update.sh 511 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # Version of libbpf to fetch headers from
  3. LIBBPF_VERSION=0.6.1
  4. # The headers we want
  5. prefix=libbpf-"$LIBBPF_VERSION"
  6. headers=(
  7. "$prefix"/LICENSE.BSD-2-Clause
  8. "$prefix"/src/bpf_endian.h
  9. "$prefix"/src/bpf_helper_defs.h
  10. "$prefix"/src/bpf_helpers.h
  11. "$prefix"/src/bpf_tracing.h
  12. )
  13. # Fetch libbpf release and extract the desired headers
  14. curl -sL "https://github.com/libbpf/libbpf/archive/refs/tags/v${LIBBPF_VERSION}.tar.gz" | \
  15. tar -xz --xform='s#.*/##' "${headers[@]}"