Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Created May 15, 2021 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexlovelltroy/1939d9ca13711b39308b803b55810c22 to your computer and use it in GitHub Desktop.
Save alexlovelltroy/1939d9ca13711b39308b803b55810c22 to your computer and use it in GitHub Desktop.
Bash script for retrieving the latest released versions of all the stuff I star on github
#!/bin/bash
GH_USER=${1-$USER}
REPOS=`curl -s https://api.github.com/users/$GH_USER/starred |grep full_name | cut -f 4 -d\" |xargs`
for REPO in $REPOS; do
VERSION=`curl -s https://api.github.com/repos/$REPO/releases |grep tag_name |grep -v rc | head -1 |cut -f4 -d\"`
echo "$REPO : $VERSION"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment