make-snapshot: copy cache files instead of linking
To get rid of setting mode and mtime of the original cache files.
This commit is contained in:
parent
b7ae26e2ee
commit
47d143be17
@ -288,14 +288,9 @@ def package(vcs, rev, destdir, tmp = nil)
|
|||||||
puts "copying #{file}"
|
puts "copying #{file}"
|
||||||
dest = exported + file[$srcdir.size..-1]
|
dest = exported + file[$srcdir.size..-1]
|
||||||
FileUtils.mkpath(File.dirname(dest))
|
FileUtils.mkpath(File.dirname(dest))
|
||||||
begin
|
|
||||||
FileUtils.ln(file, dest, force: true)
|
|
||||||
next unless File.symlink?(dest)
|
|
||||||
File.unlink(dest)
|
|
||||||
rescue SystemCallError
|
|
||||||
end
|
|
||||||
begin
|
begin
|
||||||
FileUtils.cp_r(file, dest)
|
FileUtils.cp_r(file, dest)
|
||||||
|
FileUtils.chmod_R("u=rwX,go=rX", dest)
|
||||||
rescue SystemCallError
|
rescue SystemCallError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user