-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdotfiles.rb
executable file
·34 lines (31 loc) · 1.04 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
meta 'dotfiles' do
accepts_value_for :repo, :basename
accepts_value_for :target, :basename
template {
met? {
"~/.#{target}".p.exists?
}
meet {
log_shell "Cloning", "git clone https://github.com/jondkinney/#{repo}.git ~/.#{target}"
log "Symlinking"
shellout = raw_shell("cd ~/.#{target} && chmod +x install.sh && bash install.sh").stdout
log "#{shellout}"
}
}
end
dep 'dotfiles', :full_name, :email do
full_name.ask('What full name do you want to associate with your github account?').default('Jon Kinney')
email.ask('What email do you want to associate with your github account?').default('jonkinney@gmail.com')
target = 'dotfiles'
repo = 'dotfiles'
met? {
"~/.#{target}".p.exists?
}
meet {
log_shell "Cloning", "git clone https://github.com/jondkinney/#{repo}.git ~/.#{target}"
log "Symlinking"
shellout = raw_shell("cd ~/.#{target} && chmod +x install.sh && ./install.sh '#{full_name}' #{email}").stdout
log "#{shellout}"
}
end
dep 'private-dotfiles', template: 'dotfiles'