-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdotfiles.rb
59 lines (47 loc) · 1.32 KB
/
dotfiles.rb
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
dotfiles_path = File.join(Dir.home, 'dotfiles')
dep 'dotfiles-linked' do
requires 'symlink'.with(source: '~/.dotfiles', target: '~/dotfiles')
end
dep 'dotfiles', :path do
path.default!(dotfiles_path)
requires 'dotfiles.repo'.with(path)
requires 'dotfiles-installed'.with(path)
end
dep 'dotfiles.repo', :path do
source '[email protected]:reentim/dotfiles.git'
target path
end
dep 'dotfiles-installed', :path do
# path is not defined within the requires block, when attempting to pass :(
requires { on :osx, 'dotfiles-keybindings' }
requires 'dotfiles-italic-terminals'
met? { "#{ENV['HOME']}/.aliases".p.exists? }
met? { "#{ENV['HOME']}/.vim".p.exists? }
meet {
system %Q{
cd #{path}
rake install
git submodule update --init --recursive
}
}
end
dep 'dotfiles-keybindings', :path do
path.default!(dotfiles_path)
met? { "#{ENV['HOME']}/Library/KeyBindings/DefaultKeyBinding.dict".p.exists? }
meet {
system %Q{
cd #{path}
rake keybindings
}
}
end
dep 'dotfiles-italic-terminals', :path do
path.default!(dotfiles_path)
met? { ['tmux-256color', 'xterm-256color-italic'].include? ENV['TERM'] }
meet {
cd path do
shell "rake italic_terminals"
end
unmeetable! "iTerm > Profiles > Terminal > Report terminal type: xterm-256color-italic"
}
end