Class: DebDeploy::AptFtpArchive
- Inherits:
-
Object
- Object
- DebDeploy::AptFtpArchive
- Defined in:
- lib/deb_deploy/apt_ftp_archive.rb
Class Method Summary collapse
- .command(arguments, options = {}) ⇒ Object
- .create_packages_file(from, options = {}) ⇒ Object
- .create_release_file(from, options = {}) ⇒ Object
Class Method Details
.command(arguments, options = {}) ⇒ Object
4 5 6 |
# File 'lib/deb_deploy/apt_ftp_archive.rb', line 4 def command(arguments, ={}) "apt-ftparchive " << .map{|k,v| "-o #{k}='#{v}'"}.join(' ') << " #{arguments}" end |
.create_packages_file(from, options = {}) ⇒ Object
8 9 10 |
# File 'lib/deb_deploy/apt_ftp_archive.rb', line 8 def create_packages_file(from, ={}) command("packages #{from} | gzip -9c > Packages.gz", ) end |
.create_release_file(from, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/deb_deploy/apt_ftp_archive.rb', line 12 def create_release_file(from, ={}) = { "Codename" => "deb_deploy", "Components" => "deb_deploy", "Origin" => "deb_deploy", "Label" => "Deployed with deb_deploy", "Architectures" => "all", "Suite" => "stable" } command("release #{from} > Release", .merge(Hash[.map {|k,v| ["APT::FTPArchive::Release::#{k}",v]}])) end |