Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- desc 'Installs dotfiles from this distribution for the first time'
- task :setup do
- require 'fileutils'
- homedir = File.expand_path('~')
- files = {"conkerorrc" => "#{homedir}/.conkerorrc",
- "emacs" => "#{homedir}/.emacs",
- "elisp" => "#{homedir}/elisp",
- "bashrc" => "#{homedir}/.bashrc",
- "Xresources" => "#{homedir}/.Xresources"}
- Dir.foreach(Dir.pwd) do |contents|
- if files[contents] != nil
- if File.file?(files[contents])
- File.delete(files[contents])
- end
- system("ln", "-s", contents, files[contents])
- end
- end
- end
Add Comment
Please, Sign In to add comment