Created
September 3, 2016 21:02
-
-
Save kimwalisch/859f1a016d5342fcab610183568e9cc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| total_stars=0 | |
| for i in {'primesieve','primecount','primesum','calculator'} | |
| do | |
| stars=$(curl --silent "https://api.github.com/repos/kimwalisch/$i" \ | |
| -H 'Accept: application/vnd.github.preview' \ | |
| | grep stargazers_count \ | |
| | cut -f2 -d':' \ | |
| | cut -f1 -d',' \ | |
| | cut -f2 -d' ') | |
| total_stars=$(($total_stars + $stars)) | |
| done | |
| echo "GitHub stars: $total_stars" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment