refactor symlink

This commit is contained in:
muratayusuke
2013-06-03 18:17:38 +00:00
committed by thilko
parent aa2dfcc42f
commit 830106a168
2 changed files with 54 additions and 39 deletions

View File

@@ -104,6 +104,7 @@ class Homesick
def ln_s(source, destination, config = {})
source = Pathname.new(source)
destination = Pathname.new(destination)
FileUtils.mkdir_p destination.dirname
if destination.symlink?
if destination.readlink == source