Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 447 Bytes
#!/usr/bin/env ruby
require "yaml"
require "open-uri"
require "shellwords"
# your github username
username = "USERNAME"
backupDirectory = Shellwords.escape("PATH_TO_BACKUPS")
YAML.load(open("https://api.github.com/users/#{username}/repos")).map{|repository|
puts "Discovered repository: #{repository['name']}"
system "git clone #{Shellwords.escape(repository['clone_url'])} #{backupDirectory}/#{Shellwords.escape(repository['name'])}"
}
You can’t perform that action at this time.