public
Description: My Emacs config
Homepage:
Clone URL: git://github.com/defunkt/emacs.git
emacs / install.rb
100644 30 lines (22 sloc) 0.578 kb
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
# this is not the ruby you're looking for
require 'fileutils'
 
alias :V :lambda
 
Joiner = V do |base|
  V do |*others|
    File.join(base, *others)
  end
end
 
Home = Joiner[ File.expand_path( '~' ) ]
Cwd = Joiner[ File.expand_path(File.dirname(__FILE__)) ]
 
Link = V do |target, new|
  FileUtils.ln_s Cwd[ target ], Home[ new ] rescue puts("~/#{new} exists.")
end
 
Link[ 'emacs.el', '.emacs' ]
Link[ '.', '.emacs.d' ]
 
Git = V do |command, dir|
  Dir.chdir(dir) do
    `git #{command}`
  end
end
 
`git submodule update --init`
`cd vendor/rinari && git submodule update --init`