Skip to content

Commit

Permalink
avoid grep
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Jan 6, 2025
1 parent 29ef298 commit 7c7ac7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/maintenance-intent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c7ac7c

Please sign in to comment.