Sha256: 078751d4f988f38fb3900b7c27e4e2110025397ff67db453e933a73b94aaa385

Contents?: true

Size: 799 Bytes

Versions: 1

Compression:

Stored size: 799 Bytes

Contents

#!/usr/bin/env ratch

# generate tar gzip package

main 'pack/tgz' do
  status "Creating .tgz package"

  config = configuration['pack'] || {}
  config = config['tgz'] || {}

  package = package().clone
  package.update(config)

  store = config[:store] || 'pkg'
  templ = config[:template]

  name  = package.stage_name(templ)
  stage = File.join(store, name)
  files = package.filelist

  stage(stage, files)

  if dryrun?
    status "tar -cxf #{name}.tgz"
  else
    file = nil
    cd(store) do
      file = tgz(name)
    end
    transfer(file, store)
  end
end

# Transfer package file to storage location.

def transfer(file, store)
  # move to store, unless already there
  dest = File.join(store, File.basename(file))
  dest = File.expand_path(dest)
  mv(file, store) unless file == dest
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tmail-1.2.1 script/pack/tgz