Skip to content

Commit dc8c755

Browse files
committed
pipe conditionally
1 parent dec3600 commit dc8c755

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

monthly_summary.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
: <<'BASH_DOC_MODULE'
44
55
Running `monthly_summary.sh 2024-07` produces an md-formatted summary of all the PRs that were
6-
merged into mathlib master in the month 2024-07
6+
merged into mathlib master in the month 2024-07.
7+
A "raw" format can be obtain running `monthly_summary.sh 2024-07 raw`.
8+
9+
There is a slight discrepancy
710
811
BASH_DOC_MODULE
912

@@ -114,7 +117,7 @@ fi
114117
printf -- $'---\n'
115118

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

0 commit comments

Comments
 (0)