mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 16:59:07 +08:00
vmtests: harden fetching kernel sources
Ensure that corrupted tar archive won't screw up build. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
28e26bdc3e
commit
63c78982c7
@@ -17,8 +17,7 @@ if [ ! -d "${REPO_PATH}" ]; then
|
||||
mkdir -p $(dirname "${REPO_PATH}")
|
||||
cd $(dirname "${REPO_PATH}")
|
||||
# attempt to fetch desired bpf-next repo snapshot
|
||||
if wget ${SNAPSHOT_URL} ; then
|
||||
tar xf bpf-next-${LINUX_SHA}.tar.gz
|
||||
if wget ${SNAPSHOT_URL} && tar xf bpf-next-${LINUX_SHA}.tar.gz ; then
|
||||
mv bpf-next-${LINUX_SHA} $(basename ${REPO_PATH})
|
||||
else
|
||||
# but fallback to git fetch approach if that fails
|
||||
|
||||
Reference in New Issue
Block a user