Skip to content

Commit 1eadd46

Browse files
committed
download-stats: output the information in table format
And while at it, sort by download count, in reverse order. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent de8e017 commit 1eadd46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

download-stats.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,8 @@ case "$id" in
203203
esac
204204

205205
curl -s https://api.github.com/repos/git-for-windows/git/releases/$id/assets |
206-
grep -e '"name":' -e '"download_count":'
206+
grep -e '"name":' -e '"download_count":' |
207+
sed 'N
208+
s/.*"download_count": *\([0-9]*\).*"name": *"\([^"]*\).*/\1\t\2/
209+
s/.*"name": *"\([^"]*\).*"download_count": *\([0-9]*\).*/\2\t\1/
210+
' | sort -n -r -k1

0 commit comments

Comments
 (0)