-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.thor
60 lines (48 loc) · 953 Bytes
/
install.thor
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
module Helpers
def texmf_location
case RUBY_PLATFORM
when /darwin/
"Library/texmf"
else
"texmf"
end
end
end
class Dotfiles < Thor
include Thor::Actions
include Helpers
DOTLINKS = %w(
zshrc
zshenv
zsh
vimrc
vim
emacs.d
pentadactyl
pentadactylrc
xmonad
gitconfig
gitignore.global
htmltidy.conf
ackrc
keysnail.js
)
GPGLINKS = %w(gpg.conf dirmngr.conf scdaemon.conf certs)
desc "install", "Set up symlinks in the right places"
def install(dest="~")
self.destination_root = dest
say "Installing to #{dest}..."
DOTLINKS.each do |f|
link_file f, ".#{f}"
end
GPGLINKS.each do |f|
link_file f, ".gnupg/#{f}"
end
link_file 'awesomerc.lua', '.config/awesome/rc.lua'
link_file 'texmf', texmf_location
link_file 'sharedbin', "bin/shared"
end
def self.source_root
File.dirname(__FILE__)
end
end