Artifact [8a5d6aabf6]
Artifact 8a5d6aabf63824d551082899dfaef693e919a94e:
- File examples/api/gem-to-rpm.rb — part of check-in [7d94ce620c] at 2013-04-22 23:38:02 on branch trunk — Update gem-to-rpm.rb (user: jls@semicomplete.com size: 453)
$: << File.join(File.dirname(__FILE__), "..", "..", "lib") require "fpm" package = FPM::Package::Gem.new # the Gem package takes a string name of the package to download/install. # Example, run this script with 'rails' as an argument and it will convert # the latest 'rails' gem into rpm. package.input(ARGV[0]) rpm = package.convert(FPM::Package::RPM) begin output = "NAME-VERSION.ARCH.rpm" rpm.output(rpm.to_s(output)) ensure rpm.cleanup end