-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbundleUpdate
executable file
·67 lines (60 loc) · 2.28 KB
/
bundleUpdate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env ruby
git_bundles = [
'git://github.com/gmarik/vundle.git',
'git://github.com/acoffman/Jumpback.vim.git',
'git://github.com/kien/ctrlp.vim.git',
'git://github.com/thinca/vim-localrc.git',
'git://github.com/scrooloose/nerdtree.git',
'git://github.com/vim-scripts/ZoomWin.git',
'git://github.com/vim-scripts/grep.vim.git',
'git://github.com/erivandew/supertab.git',
'git://github.com/vim-scripts/AutoTag.git',
'git://github.com/duellj/DirDiff.vim.git',
'git://github.com/vim-scripts/ScrollColors.git',
'git://github.com/tpope/vim-surround.git',
'git://github.com/scrooloose/nerdcommenter.git',
'git://github.com/erhard/vim_function_pool.git',
'git://github.com/mattn/emmet-vim.git',
'git://github.com/motemen/git-vim.git',
'git://github.com/majutsushi/tagbar.git',
'git://github.com/wincent/Command-T.git',
'git://github.com/vim-scripts/mru.vim.git',
"git://github.com/MarcWeber/vim-addon-mw-utils.git",
"git://github.com/tomtom/tlib_vim",
"git://github.com/terryma/vim-multiple-cursors.git",
"git://github.com/SirVer/ultisnips.git",
"git://github.com/ervandew/supertab.git",
"git://github.com/vim-ruby/vim-ruby.git",
"git://github.com/vim-scripts/Decho",
"git://github.com/leafgarland/typescript-vim.git",
"git://github.com/valloric/YouCompleteMe.git",
"git://github.com/othree/xml.vim.git",
"git://github.com/vim-utils/vim-ruby-fold.git",
"git://github.com/nelstrom/vim-markdown-folding.git",
"git://github.com/posva/vim-vue.git",
"git://github.com/mg979/vim-localhistory"
]
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