mirror of
https://github.com/jordansissel/fpm
synced 2024-12-22 00:34:15 +01:00
17 lines
453 B
Ruby
17 lines
453 B
Ruby
$: << 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
|