Created
July 23, 2016 00:43
-
-
Save chaoslogick/8411ce03913de10f02e51875de034beb to your computer and use it in GitHub Desktop.
BASH: Clone all user's github repos
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/bash | |
if [ -z "$1" ] | |
then | |
echo "No arguments supplied" | |
else | |
curl -u michaelperrygoodman -s https://api.github.com/users/$1/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment