Class: Rant::Generators::Package::Tgz

Inherits:
Archive::Tgz show all
Defined in:
lib/rant/import/package/tgz.rb

Instance Attribute Summary

Attributes inherited from Archive::Base

#archive_path, #ch

Instance Method Summary collapse

Methods inherited from Archive::Tgz

#define_task, #initialize

Methods inherited from Archive::Base

#define_manifest_task, #get_archive_path, #get_files, #initialize, #path, #rac, #rac=, rant_gen, #with_manifest

Methods included from MetaUtils

#rant_attr, #rant_flag, #redirect_accessor, #redirect_message, #redirect_reader, #redirect_writer, #string_attr, #valid_attr_name

Constructor Details

This class inherits a constructor from Rant::Generators::Archive::Tgz

Instance Method Details

#define_minitar_taskObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/rant/import/package/tgz.rb', line 22

def define_minitar_task
    define_task_for_dir do
	fn = @dist_dirname + (@extension ? @extension : "")
	old_pwd = Dir.pwd
               begin
                   Dir.chdir @dist_root
                   minitar_tgz fn, @dist_dirname, :recurse => true
               ensure
                   Dir.chdir old_pwd
               end
           end
end

#define_tar_taskObject



13
14
15
16
17
18
19
20
21
# File 'lib/rant/import/package/tgz.rb', line 13

def define_tar_task
    define_task_for_dir do |t|
	fn = @dist_dirname + (@extension ? @extension : "")
	old_pwd = Dir.pwd
	Dir.chdir @dist_root
	@rac.cx.sys %W(tar zcf #{fn} #@dist_dirname)
	Dir.chdir old_pwd
    end
end