Created
August 25, 2013 00:43
-
-
Save thogg4/6331203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
git_bundles = [ | |
"git://github.com/msanders/snipmate.vim.git", | |
#"git://github.com/scrooloose/nerdtree.git", | |
#"git://github.com/tpope/vim-haml.git", | |
"git://github.com/tpope/vim-markdown.git", | |
#"git://github.com/tpope/vim-rails.git", | |
#"git://github.com/tpope/vim-repeat.git", | |
#"git://github.com/tpope/vim-surround.git", | |
#"git://github.com/tsaleh/vim-align.git", | |
"git://github.com/vim-ruby/vim-ruby.git", | |
"git://github.com/mileszs/ack.vim.git", | |
"git://github.com/scrooloose/nerdcommenter.git", | |
"git://github.com/kchmck/vim-coffee-script.git", | |
"git://github.com/altercation/vim-colors-solarized.git", | |
#"git://github.com/mattn/gist-vim.git", | |
#"git://github.com/jpalardy/vim-slime.git", | |
#"git://github.com/vim-scripts/VimClojure.git", | |
"git://github.com/kien/ctrlp.vim.git", | |
"git://github.com/pangloss/vim-javascript.git", | |
"git://github.com/bbommarito/vim-slim.git", | |
"git://github.com/groenewege/vim-less.git", | |
"git://github.com/juvenn/mustache.vim.git" | |
] | |
vim_org_scripts = [ | |
] | |
zip_files = { } | |
require 'fileutils' | |
require 'open-uri' | |
bundles_dir = File.join(File.dirname(__FILE__), "bundle") | |
FileUtils.cd(bundles_dir) | |
puts "Trashing everything (lookout!)" | |
Dir["*"].each {|d| FileUtils.rm_rf d } | |
git_bundles.each do |url| | |
dir = url.split('/').last.sub(/\.git$/, '') | |
puts " Unpacking #{url} into #{dir}" | |
`git clone #{url} #{dir}` | |
FileUtils.rm_rf(File.join(dir, ".git")) | |
end | |
zip_files.each do |name, url| | |
puts " Downloading zip #{name}" | |
local_file = "#{name}.zip" | |
FileUtils.mkdir_p(name) | |
File.open(local_file, "w") do |file| | |
file << open(url).read | |
end | |
`unzip #{local_file} -d #{name}` | |
FileUtils.rm(local_file) | |
end | |
vim_org_scripts.each do |name, script_id, script_type| | |
puts " Downloading #{name}" | |
local_file = File.join(name, script_type, "#{name}.vim") | |
FileUtils.mkdir_p(File.dirname(local_file)) | |
File.open(local_file, "w") do |file| | |
file << open("http://www.vim.org/scripts/download_script.php?src_id=#{script_id}").read | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment