diff mbox series

[6/6] CI: Simplify the MUSL check

Message ID 20221230003848.3241-7-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series CI: Fixes/cleanup in preparation for RISCV | expand

Commit Message

Andrew Cooper Dec. 30, 2022, 12:38 a.m. UTC
There's no need to do ad-hoc string parsing.  Use grep -q instead.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Doug Goldstein <cardoe@cardoe.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 automation/scripts/build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Stabellini Jan. 4, 2023, 1:22 a.m. UTC | #1
On Fri, 30 Dec 2022, Andrew Cooper wrote:
> There's no need to do ad-hoc string parsing.  Use grep -q instead.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony PERARD <anthony.perard@citrix.com>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  automation/scripts/build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/automation/scripts/build b/automation/scripts/build
> index 206312ecc7d0..f2f5e55bc04f 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -65,7 +65,7 @@ else
>          cfgargs+=("--disable-stubdom")
>      fi
>  
> -    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
> +    if ldd /bin/ls | grep -q musl; then
>          # disable --disable-werror for QEMUU when building with MUSL
>          cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
>          # SeaBIOS doesn't build on MUSL systems
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/automation/scripts/build b/automation/scripts/build
index 206312ecc7d0..f2f5e55bc04f 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -65,7 +65,7 @@  else
         cfgargs+=("--disable-stubdom")
     fi
 
-    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
+    if ldd /bin/ls | grep -q musl; then
         # disable --disable-werror for QEMUU when building with MUSL
         cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
         # SeaBIOS doesn't build on MUSL systems