-
Notifications
You must be signed in to change notification settings - Fork 4
/
update_bundles
executable file
·94 lines (81 loc) · 2.95 KB
/
update_bundles
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/kien/ctrlp.vim.git",
"git://github.com/benmills/vimux.git",
"git://github.com/geoffharcourt/vim-matchit.git",
"git://github.com/guns/vim-clojure-static.git",
"git://github.com/jnwhiteh/vim-golang.git",
"git://github.com/kchmck/vim-coffee-script.git",
"git://github.com/tomtom/tlib_vim.git",
"git://github.com/MarcWeber/vim-addon-mw-utils.git",
"git://github.com/garbas/vim-snipmate.git",
"git://github.com/honza/vim-snippets.git",
"git://github.com/pangloss/vim-javascript",
"git://github.com/pgr0ss/vimux-ruby-test.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/terryma/vim-expand-region.git",
"git://github.com/tpope/vim-classpath.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-dispatch.git",
"git://github.com/tpope/vim-fireplace.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
"git://github.com/tpope/vim-haml.git",
"git://github.com/tpope/vim-markdown.git",
"git://github.com/tpope/vim-pathogen.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/tpope/vim-unimpaired.git",
"git://github.com/tsaleh/vim-supertab.git",
"git://github.com/vim-ruby/vim-ruby.git",
"git://github.com/vim-scripts/CSApprox.git",
"git://github.com/vim-scripts/Colour-Sampler-Pack.git",
"git://github.com/vim-scripts/jquery.git",
"git://github.com/vim-scripts/SyntaxRange.git",
"git://github.com/godlygeek/tabular.git",
"git://github.com/jceb/vim-orgmode.git",
"git://github.com/mattn/emmet-vim.git",
"git://github.com/lambdatoast/elm.vim.git",
"git://github.com/elixir-lang/vim-elixir.git",
"git://github.com/ElmCast/elm-vim.git",
"git://github.com/nvie/vim-flake8.git"
]
hg_bundles = [
# e.g.
"https://bitbucket.org/kovisoft/paredit"
]
require 'fileutils'
require 'open-uri'
bundles_dir = File.join(File.dirname(__FILE__), "bundle")
FileUtils.mkdir_p(bundles_dir)
FileUtils.cd(bundles_dir)
git_bundles.each do |url|
dir = url.split('/').last.sub(/\.git$/, '')
if File.exists?(dir)
if !ENV["SKIP_UPDATING_VIM_BUNDLES"]
puts " Pulling from #{url} into #{dir}"
`cd #{dir} && git reset --hard && git pull && cd ..`
end
else
puts " Unpacking #{url} into #{dir}"
`git clone #{url} #{dir}`
end
end
if system("which", "hg")
hg_bundles.each do |url|
dir = url.split('/').last
if File.exists?(dir)
if !ENV["SKIP_UPDATING_VIM_BUNDLES"]
puts " Pulling from #{url} into #{dir}"
`cd #{dir} && hg pull && cd ..`
end
else
puts " Unpacking #{url} into #{dir}"
system("hg", "clone", url, dir, :out => '/dev/null')
end
end
end
puts "####################"
puts "# Don't forget to build extensions (e.g. Command-T) or install packages (e.g. `sudo pip install flake8`) if you haven't already."
puts "####################"