[Git][ghc/ghc][wip/bump-images-9.6] Better regex
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Mon Jan 29 13:09:14 UTC 2024
Matthew Pickering pushed to branch wip/bump-images-9.6 at Glasgow Haskell Compiler / GHC
Commits:
6bd718e3 by Matthew Pickering at 2024-01-29T13:09:04+00:00
Better regex
- - - - -
1 changed file:
- m4/find_llvm_prog.m4
Changes:
=====================================
m4/find_llvm_prog.m4
=====================================
@@ -14,7 +14,7 @@ AC_DEFUN([FIND_LLVM_PROG],[
PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $(($4-1)) -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion"; done)
AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
AS_IF([test x"$$1" != x],[
- PROG_VERSION=`$$1 --version | awk '/.*version [[0-9\.]]+/{for(i=1;i<=NF;i++){ if(\$i ~ /^[[0-9\.]]+$/){print \$i}}}'`
+ PROG_VERSION=`$$1 --version | sed -n -e 's/.*version \(\([[0-9]]\+\.\)\+[[0-9]]\+\).*/\1/gp'`
AS_IF([test x"$PROG_VERSION" = x],
[AC_MSG_RESULT(no)
$1=""
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6bd718e30849b01085ff13b698d780acaad07800
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6bd718e30849b01085ff13b698d780acaad07800
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240129/99d49025/attachment.html>
More information about the ghc-commits
mailing list