mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-05 17:30:15 +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:
1 parent
28e26bdc3e
commit
63c78982c7
1 file changed
+1
-2
@@ -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