Skip to content

Commit 62ecac6

Browse files
committed
Simplify script
1 parent ac735dc commit 62ecac6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tools/git/scripts/additions_per_weekday

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ shortstats="${root}/tools/git/scripts/shortstats"
1111
# * `shortstats`
1212
# - Get summary statistics for each commit.
1313
# * `awk '{}'`
14-
# - Extract the commit timestamp and number of additions.
15-
# * `perl -pe ''`
16-
# - Convert each Unix timestamp to a date string.
17-
# * `awk '{}'`
1814
# - Tabulate the weekday totals.
19-
"${shortstats}" | awk '{print $1 OFS $5}' | perl -pe 's/(\d+)/localtime($1)/e' | awk '
15+
"${shortstats}" | awk '
2016
BEGIN {
2117
split("Mon Tue Wed Thu Fri Sat Sun", days);
2218
}
2319
{
24-
lines[$1] += $6
20+
lines[$1] += $9
2521
}
2622
END {
2723
for (i = 1; i <= 7; i++) {

0 commit comments

Comments
 (0)