Class: FPM::Cookery::SourceHandler::Curl
- Defined in:
- lib/fpm/cookery/source_handler/curl.rb
Constant Summary collapse
- NAME =
:curl
- CHECKSUM =
true
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
#extract ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/fpm/cookery/source_handler/curl.rb', line 23 def extract Dir.chdir(builddir) do case local_path.extname when '.bz2', '.gz', '.tgz' safesystem('tar', 'xf', local_path) when '.shar', '.bin' File.chmod(0755, local_path) safesystem(local_path) when '.zip' safesystem('unzip', '-d', local_path.basename('.zip'), local_path) end extracted_source end end |