Skip to content

Instantly share code, notes, and snippets.

@illwieckz
Created May 26, 2017 21:57
Show Gist options
  • Save illwieckz/c98b80eb2f8ca23c0cda219115192aa6 to your computer and use it in GitHub Desktop.
Save illwieckz/c98b80eb2f8ca23c0cda219115192aa6 to your computer and use it in GitHub Desktop.
List unvanquished dev feeds
#! /bin/sh
listGitHubUser () {
cat <<-EOF
DaemonEngine
Unvanquished
UnvanquishedAssets
EOF
}
listGitHubRepo () {
user="${1}"
curl -s "https://api.github.com/users/${user}/repos?per_page=1000" \
| grep -o 'html_url": "https://github.com/'"${user}"'/[^"]*' \
| cut -c13-
}
getGitHubFeed () {
repo="${1}"
printf '%s/commits.atom\n' "${repo}"
}
for user in $(listGitHubUser)
do
for repo in $(listGitHubRepo "${user}")
do
getGitHubFeed "${repo}"
done
done
#EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment