Add do_link helper

This commit is contained in:
Henrik Lissner 2014-06-21 04:42:57 -04:00
parent 737d5432f9
commit bd44a20c60

View file

@ -12,3 +12,9 @@ def sh_safe(cmd)
return false return false
end end
end end
def do_link(src, dest)
if not (File.exist?(path_to_file) || File.symlink?(path_to_file))
sh_safe "ln -sf #{src} #{dest}"
end
end