Guest User

Untitled

a guest
Apr 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. desc 'Installs dotfiles from this distribution for the first time'
  2.  
  3. task :setup do
  4. require 'fileutils'
  5.  
  6. homedir = File.expand_path('~')
  7.  
  8. files = {"conkerorrc" => "#{homedir}/.conkerorrc",
  9. "emacs" => "#{homedir}/.emacs",
  10. "elisp" => "#{homedir}/elisp",
  11. "bashrc" => "#{homedir}/.bashrc",
  12. "Xresources" => "#{homedir}/.Xresources"}
  13.  
  14. Dir.foreach(Dir.pwd) do |contents|
  15. if files[contents] != nil
  16. if File.file?(files[contents])
  17. File.delete(files[contents])
  18. end
  19. system("ln", "-s", contents, files[contents])
  20. end
  21. end
  22. end
Add Comment
Please, Sign In to add comment