Created
June 2, 2015 04:49
-
-
Save bradbergeron-us/36eb11da0ce8da17bcd6 to your computer and use it in GitHub Desktop.
Rakefile for Symlinking dotfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Symlink every file" | |
task :default do | |
files = Dir.glob("*").reject { |file| file == "Rakefile" } | |
current_path = File.dirname(__FILE__) + "/" | |
# Print start message | |
p "Symlinking: #{files.join(", ")}" | |
files.each do |file| | |
sh "ln -vfs #{current_path}#{file} ~/.#{file}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment