diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-17 23:52:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-17 23:52:58 +0000 |
commit | 6b5695fef9a99421a61c236c2118f793f6e4559b (patch) | |
tree | 30aa2d42e59764abd036d8ffd878dd824be179b1 /tool | |
parent | dabbdcfd6d10e6853554b6224d962adfade53adf (diff) |
make-snapshot: make permissions uniform
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/make-snapshot | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 10bcd86be5..9bccecaf26 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -167,20 +167,23 @@ def tar_create(tarball, dir) Dir.glob("#{dir}/**/*", File::FNM_DOTMATCH) do |path| next if File.basename(path) == "." s = File.stat(path) + mode = 0644 case when s.file? type = nil size = s.size + mode |= 0111 if s.executable? when s.directory? path += "/" type = dir_type size = 0 + mode |= 0111 else next end name, prefix = w.split_name(path) h = header.new(name: name, prefix: prefix, typeflag: type, - mode: s.mode, size: size, mtime: s.mtime, + mode: mode, size: size, mtime: s.mtime, uname: uname, gname: gname) f.write(h) if size > 0 |