xdp-tools: fix BPFTOOL detection
Fix sh syntax error in configure script. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xdp-tools
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=1.6.3
|
||||
PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -109,11 +109,11 @@ check_toolchain()
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- if ! command -v $BPFTOOL &>/dev/null; then
|
||||
+ if ! command -v $BPFTOOL >/dev/null 2>&1; then
|
||||
BPFTOOL=$(whereis -b bpftool | awk '{print $2}')
|
||||
fi
|
||||
|
||||
- if command -v $BPFTOOL &>/dev/null && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then
|
||||
+ if command -v $BPFTOOL >/dev/null 2>&1 && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then
|
||||
bpftool_version=$($BPFTOOL version | head -n 1)
|
||||
echo "using $bpftool_version"
|
||||
else
|
||||
Reference in New Issue
Block a user