Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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