Class: FPM::Cookery::SourceHandler::LocalPath

Inherits:
Template
  • Object
show all
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 Template

#checksum?, #initialize, #local_path, #source

Constructor Details

This class inherits a constructor from FPM::Cookery::SourceHandler::Template

Instance Method Details

#extractObject



18
19
20
21
22
23
24
25
# File 'lib/fpm/cookery/source_handler/local_path.rb', line 18

def extract
  extracted_source = (builddir/File.basename(local_path)).to_s

  FileUtils.rm_rf(extracted_source)
  FileUtils.cp_r(source.path, extracted_source)

  extracted_source
end

#fetchObject



12
13
14
15
16
# File 'lib/fpm/cookery/source_handler/local_path.rb', line 12

def fetch
  # No need to fetch anything. The files are on the disk already.
  Log.info "Local path: #{source.path}"
  @local_path = source.path
end