summaryrefslogtreecommitdiffstats
path: root/scripts/rust_is_available.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rust_is_available.sh')
-rwxr-xr-xscripts/rust_is_available.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
index 7e0368babe64..810691af66eb 100755
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -157,9 +157,7 @@ fi
# of the `libclang` found by the Rust bindings generator is suitable.
bindgen_libclang_version=$( \
echo "$bindgen_libclang_output" \
- | grep -F 'clang version ' \
- | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
- | head -n 1 \
+ | sed -nE 's:.*clang version ([0-9]+\.[0-9]+\.[0-9]+).*:\1:p'
)
bindgen_libclang_min_version=$($min_tool_version llvm)
bindgen_libclang_cversion=$(get_canonical_version $bindgen_libclang_version)