Weird backend manifest format update.
This commit is contained in:
parent
817f6fe51c
commit
5bfaacfd09
@ -60,15 +60,17 @@ class WeirdBackend < Package::Backend::Packaging
|
||||
Dir.cd package.fake_root_directory
|
||||
|
||||
FileUtils.find "." do |path|
|
||||
file = path.lchop
|
||||
|
||||
if File.symlink? path
|
||||
manifest.puts [path, "symlink", File.readlink(path)].join ':'
|
||||
manifest.puts [file, "symlink", File.readlink(path)].join ':'
|
||||
elsif File.directory? path
|
||||
manifest.puts [path, "directory"].join ':'
|
||||
manifest.puts [file, "directory"].join ':'
|
||||
elsif File.info?(path).try &.file?
|
||||
digest = OpenSSL::Digest.new("sha256").file(path).hexdigest
|
||||
manifest.puts [path, "file", digest].join ':'
|
||||
manifest.puts [file, "file", digest].join ':'
|
||||
else
|
||||
manifest.puts [path, "other"].join ':'
|
||||
manifest.puts [file, "other"].join ':'
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user