diff options
Diffstat (limited to 'packaging/bundle-libbpf.sh')
-rwxr-xr-x | packaging/bundle-libbpf.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packaging/bundle-libbpf.sh b/packaging/bundle-libbpf.sh index 4c16dd123..3ca183b0f 100755 --- a/packaging/bundle-libbpf.sh +++ b/packaging/bundle-libbpf.sh @@ -1,7 +1,4 @@ -#!/bin/sh - -LIBBPF_TARBALL="v$(cat "${1}/packaging/libbpf.version").tar.gz" -LIBBPF_BUILD_PATH="${1}/externaldeps/libbpf/libbpf-$(cat "${1}/packaging/libbpf.version")" +#!/bin/bash if [ "$(uname -m)" = x86_64 ]; then lib_subdir="lib64" @@ -9,6 +6,17 @@ else lib_subdir="lib" fi +if [ "${2}" != "centos7" ]; then + cp "${1}/packaging/current_libbpf.checksums" "${1}/packaging/libbpf.checksums" + cp "${1}/packaging/current_libbpf.version" "${1}/packaging/libbpf.version" +else + cp "${1}/packaging/libbpf_0_0_9.checksums" "${1}/packaging/libbpf.checksums" + cp "${1}/packaging/libbpf_0_0_9.version" "${1}/packaging/libbpf.version" +fi + +LIBBPF_TARBALL="v$(cat "${1}/packaging/libbpf.version").tar.gz" +LIBBPF_BUILD_PATH="${1}/externaldeps/libbpf/libbpf-$(cat "${1}/packaging/libbpf.version")" + mkdir -p "${1}/externaldeps/libbpf" || exit 1 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/libbpf/archive/${LIBBPF_TARBALL}" > "${LIBBPF_TARBALL}" || exit 1 sha256sum -c "${1}/packaging/libbpf.checksums" || exit 1 |