scx-upstream/meson-scripts/fetch_libbpf
Jordan Rome 1769dece7d Remove libbpf as a submodule
Instead clone the libbpf repo at a specific hash during setup.
This is to fix an issue whereby submodules are not included
in the tarball and therefore won't be updated/fetched during
setup after unzipping the tarball.
2024-03-07 18:31:09 -08:00

13 lines
275 B
Bash

#!/bin/bash
cd $1
rm -rf libbpf
git clone --depth=1 https://github.com/libbpf/libbpf
cd libbpf
git fetch --depth=1 origin $2
git checkout $2
# This is needed because we haven't built libbpf yet
# and this is where the headers will end up
mkdir src/usr
mkdir src/usr/include