Class: FPM::Cookery::SourceHandler::LocalPath
- Defined in:
- lib/fpm/cookery/source_handler/local_path.rb
Constant Summary collapse
- CHECKSUM =
false
- NAME =
:local_path
Instance Attribute Summary
Attributes inherited from Template
#builddir, #cachedir, #has_checksum, #name, #options, #url
Instance Method Summary collapse
Methods inherited from Curl
Methods inherited from Template
#checksum?, #extract, #initialize, #local_path, #source
Constructor Details
This class inherits a constructor from FPM::Cookery::SourceHandler::Template
Instance Method Details
#fetch(config = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/fpm/cookery/source_handler/local_path.rb', line 12 def fetch(config = {}) if local_path.exist? Log.info "Using cached file #{local_path}" else Log.info "Copying #{source.path} to cache" FileUtils.cp_r(source.path, cachedir) end local_path end |