-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.homesickrc
33 lines (24 loc) · 916 Bytes
/
.homesickrc
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
require 'fileutils'
puts 'making vim dirs'
vim_dir = File.join(File.expand_path(ENV['HOME']), '.vim')
vim_colors_dir = File.join(File.expand_path(vim_dir), 'colors')
pathogen_path = "#{vim_dir}/autoload/pathogen.vim"
%w[backups tmp colors autoload bundle].each do |dir|
path = File.join(File.expand_path(vim_dir), dir)
FileUtils.mkdir_p(path) unless Dir.exist?(path)
end
puts 'checking for solarized'
unless File.exist? File.join(vim_colors_dir, 'colors/solarized.vim')
tmp = '/tmp/solarized'
puts 'installing solarized'
`rm -rf #{tmp}`
`git clone https://github.com/altercation/solarized #{tmp}`
`rm -rf #{vim_colors_dir}/solarized.vim`
`cp -f #{tmp}/vim-colors-solarized/colors/solarized.vim #{vim_colors_dir}/`
`rm -rf #{tmp}`
end
puts 'checking for pathogen'
unless File.exist? pathogen_path
puts 'installing pathogen'
`curl -LSso #{pathogen_path} https://tpo.pe/pathogen.vim`
end