Created
May 2, 2017 05:59
-
-
Save rummanwaqar/741c8a5a7bd8d489abd00ef88923640f to your computer and use it in GitHub Desktop.
Clone all github repos
This file contains 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
function git.github.clone.organization() { | |
if [ $# -ne 0 ] | |
then | |
mkdir $1 | |
cd $1 | |
curl -s https://api.github.com/orgs/$1/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' | |
else | |
echo "git.github.clone.organization <organization>" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment