mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 1 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue