Merge pull request #402 from sched-ext/meson-check-git-commit

meson: check if commit exists in remote git repos
This commit is contained in:
Andrea Righi 2024-06-28 19:03:02 +02:00 committed by GitHub
commit b7977f1ce3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 5 deletions

View File

@ -1,9 +1,14 @@
#!/bin/bash
URL=https://github.com/libbpf/bpftool.git
cd $1
rm -rf bpftool
git clone --depth=1 https://github.com/libbpf/bpftool.git
git clone --depth=1 ${URL}
cd bpftool
git fetch --depth=1 origin $2
git fetch --depth=1 origin $2 || {
echo "commit $2 does not exists in ${URL}"
exit 1
}
git checkout $2
git submodule update --init --recursive
git submodule update --init --recursive

View File

@ -1,11 +1,16 @@
#!/bin/bash
URL=https://github.com/libbpf/libbpf.git
unset CDPATH
cd $1
rm -rf libbpf
git clone --depth=1 https://github.com/libbpf/libbpf
git clone --depth=1 ${URL}
cd libbpf
git fetch --depth=1 origin $2
git fetch --depth=1 origin $2 || {
echo "commit $2 does not exists in ${URL}"
exit 1
}
git checkout $2
# This is needed because we haven't built libbpf yet