Merge pull request #266 from duhanebel/install_link_fix
Fix a bug that's causing the installer to overwrite backup files
This commit is contained in:
commit
c2a4b2cf88
2
Rakefile
2
Rakefile
@ -173,7 +173,7 @@ def file_operation(files, method = :symlink)
|
||||
puts "Source: #{source}"
|
||||
puts "Target: #{target}"
|
||||
|
||||
if File.exists?(target) || File.symlink?(target)
|
||||
if File.exists?(target) && (!File.symlink?(target) || (File.symlink?(target) && File.readlink(target) != source))
|
||||
puts "[Overwriting] #{target}...leaving original at #{target}.backup..."
|
||||
run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" }
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user