Skip to content

Instantly share code, notes, and snippets.

@aereal
Created March 1, 2014 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/9289192 to your computer and use it in GitHub Desktop.
Save aereal/9289192 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
REPOS_DIR = File.expand_path('~/repos')
owner_and_repo, * = *ARGV
clone_dir = File.join(REPOS_DIR, '@' + owner_and_repo)
if FileTest.directory?(clone_dir)
abort "#{owner_and_repo} is already cloned"
end
system 'git', 'clone', "git://github.com/#{owner_and_repo}.git", clone_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment