Class: LogicalConstruct::PackTarballTask
- Inherits:
-
TarballTask
- Object
- Mattock::Rake::FileCommandTask
- TarballTask
- LogicalConstruct::PackTarballTask
show all
- Defined in:
- lib/logical-construct/archive-tasks.rb
Instance Method Summary
collapse
Methods inherited from TarballTask
#action_flag, #add_options, #default_configuration, #resolve_configuration, #tar_command, #tar_command_without_directory
Instance Method Details
#command ⇒ Object
97
98
99
100
101
|
# File 'lib/logical-construct/archive-tasks.rb', line 97
def command
tar_command("--create") do |tar|
tar.options << "--files-from="+listfile.absolute_path
end
end
|
#define ⇒ Object
111
112
113
114
115
116
|
# File 'lib/logical-construct/archive-tasks.rb', line 111
def define
super
if prerequisite_tasks.empty?
enhance(source_files)
end
end
|
#needed? ⇒ Boolean
103
104
105
106
107
108
109
|
# File 'lib/logical-construct/archive-tasks.rb', line 103
def needed?
return true if super
if File::exists?(target_path)
return !(tar_command("--compare"){|tar| tar.options << "--files-from=" + listfile.absolute_path } & tar_command("--compare")).succeeds?
end
return true
end
|