Skip to content

Instantly share code, notes, and snippets.

@akluth
Created January 28, 2014 09:09
Show Gist options
  • Save akluth/8664422 to your computer and use it in GitHub Desktop.
Save akluth/8664422 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
#
use strict;
use warnings;
use LWP::Simple;
use JSON;
my $json = get("https://api.github.com/users/deralex/repos");
my $data = decode_json($json);
my $target = $ARGV[0];
foreach my $chunk(@$data) {
print "Cloning $chunk->{full_name}...";
my @repo = split("/", $chunk->{full_name});;
my $result = `git clone https://github.com/$chunk->{full_name} $target/$repo[1] &> /dev/null`;
print "done.\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment