Skip to content

Instantly share code, notes, and snippets.

@wilson
Created November 10, 2010 03:36
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 wilson/670305 to your computer and use it in GitHub Desktop.
Save wilson/670305 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'fileutils'
require 'open-uri'
bundle_data = {
:"vim-ruby" => %w[vim-ruby],
:"vim-scripts" => %w[AutoTag jQuery Gist.vim IndexedSearch spacehi.vim xterm16.vim netrw.vim],
:godlygeek => %w[tabular],
:scrooloose => %w[nerdtree],
:timcharper => %w[textile.vim],
:tpope => %w[vim-cucumber vim-fugitive vim-git vim-haml vim-markdown vim-rails vim-repeat vim-surround vim-vividchalk],
:tsaleh => %w[vim-shoulda vim-supertab vim-tcomment],
:wgibbs => %w[vim-irblack]
}
git_bundles = []
bundle_data.each do |author, scripts|
scripts.each do |name|
git_bundles << "git://github.com/#{author}/#{name}.git"
end
end
bundles_dir = File.join(File.dirname(__FILE__), "bundle")
FileUtils.rm_rf(bundles_dir) if File.directory?(bundles_dir)
FileUtils.mkdir_p(bundles_dir)
Dir.chdir(bundles_dir) do
$stderr.puts "Downloading vim bundles"
git_bundles.each do |url|
dir = File.basename(url, '.git')
label = " [#{dir}]".ljust(18)
$stderr.puts "#{label} -> #{url}"
`git clone -q #{url} #{dir}`
FileUtils.rm_rf(File.join(dir, ".git"))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment