From 7c7ac7c483a41e25745c93aa1c0680a8a7341294 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 6 Jan 2025 22:41:37 +0100 Subject: [PATCH] avoid grep --- .github/workflows/maintenance-intent.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maintenance-intent.yml b/.github/workflows/maintenance-intent.yml index c381bfd0efc..1990a10fc8d 100644 --- a/.github/workflows/maintenance-intent.yml +++ b/.github/workflows/maintenance-intent.yml @@ -24,10 +24,9 @@ jobs: echo "here2 $bn" if [ $bn = "opam" ]; then echo "here3 $bn" - grep "^x-maintenance-intent: " ${file} > /dev/null; - maint_int_present=$? + maint_int_present=$(grep -c "^x-maintenance-intent: " ${file} || echo 0) echo "here4 $maint_int_present" - if [ $maint_int_present -eq 1 ]; then + if [ $maint_int_present -neq 0 ]; then echo "here5 $maint_int_present" echo "- $file" >> maint-int.md fi;