Skip to content

Instantly share code, notes, and snippets.

@kimwalisch
Created September 3, 2016 21:02
Show Gist options
  • Select an option

  • Save kimwalisch/859f1a016d5342fcab610183568e9cc2 to your computer and use it in GitHub Desktop.

Select an option

Save kimwalisch/859f1a016d5342fcab610183568e9cc2 to your computer and use it in GitHub Desktop.
#!/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