Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ ⎇ branch:  cross package maker


Artifact [bed5fbaa27]

Artifact bed5fbaa278604c1131196d6c2eabb823ac5c5b8:

  • File templates/arch/MTREE.erb — part of check-in [32632f2a8d] at 2015-05-01 02:17:52 on branch trunk — Add architecture mapping, limit mode per & 07777. (user: mario size: 749)

#mtree
<%
 lines = ""
 lasth = ""

 ::Dir.chdir(staging_path) do
   ::Dir.glob("./**/*") do |fn|

     #-- per file/directory
     stat = File.stat(fn)
     f_mode = (stat.mode & 07777).to_s(8)
     if File.directory? fn
       head = "/set uid=0 gid=0 mode=#{f_mode}\n"
       line = "#{fn} time=#{stat.mtime.to_f} type=dir\n"
     else
       f_md5 = Digest::MD5.file(fn).hexdigest
       f_sha = Digest::SHA256.file(fn).hexdigest
       head = "/set type=file uid=0 gid=0 mode=#{f_mode}\n"
       line = "#{fn} time=#{stat.mtime.to_f} size=#{stat.size} md5digest=#{f_md5} sha256digest=#{f_sha}\n"
     end

     #-- collect output
     if head != lasth
       lines += head
       lasth = head
     end
     lines += line
   end
 end
%><%=lines%>