Skip to content

Commit

Permalink
pipe conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
adomani committed Aug 2, 2024
1 parent dec3600 commit dc8c755
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions monthly_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
: <<'BASH_DOC_MODULE'
Running `monthly_summary.sh 2024-07` produces an md-formatted summary of all the PRs that were
merged into mathlib master in the month 2024-07
merged into mathlib master in the month 2024-07.
A "raw" format can be obtain running `monthly_summary.sh 2024-07 raw`.
There is a slight discrepancy
BASH_DOC_MODULE

Expand Down Expand Up @@ -114,7 +117,7 @@ fi
printf -- $'---\n'

rm -rf found_by_gh.txt found_by_git.txt
} | if [ "${raw}" == "raw" ]; then cat; else # extra .md formatting
} | { if [ "${raw}" == "raw" ]; then cat; else # extra .md formatting
sed '
/ [0-9]* PRs$/{
s=^=</details><details><summary>\n=
Expand All @@ -126,4 +129,4 @@ rm -rf found_by_gh.txt found_by_git.txt
s=\n---\nReports\n\n=\n</details>\n\n---\n\n<details><summary>Reports</summary>\n\n=
s=\n---[\n]*$=\n\n</details>\n&=
'
fi
fi }

0 comments on commit dc8c755

Please sign in to comment.