-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Jarvis
committed
Sep 16, 2015
1 parent
4d9955c
commit 80e6330
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env ruby | ||
|
||
git_bundles = [ | ||
"git://github.com/godlygeek/tabular.git", | ||
"git://github.com/scrooloose/syntastic", | ||
"git://github.com/rodjek/vim-puppet.git", | ||
"https://github.com/bling/vim-airline", | ||
"https://github.com/tpope/vim-fugitive", | ||
"https://github.com/SirVer/ultisnips.git", | ||
"https://github.com/honza/vim-snippets", | ||
] | ||
|
||
vim_org_scripts = [ | ||
["IndexedSearch", "7062", "plugin"], | ||
["jquery", "12107", "syntax"], | ||
] | ||
|
||
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 | ||
|
||
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 |