Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (14 sloc) 598 Bytes
#!/usr/bin/env ruby
# from, with local mods
require "fileutils"
home = File.expand_path "~"
Dir["*"].each do | file |
next if %w( bin install ).include?(file)
## need to properly handle directories, that are already linked?
## currently, running this in ~/.dotfiles is adding a symlink inside each directory (that isn't `bin`)
target = File.join(home, ".#{file}")
if File.exists?(target) && !File.symlink?(target)
FileUtils.cp target, "#{target}.saved"
FileUtils.ln_s File.expand_path(file), target, force: true
Something went wrong with that request. Please try again.