blob: 62df38ffcb3f65fce123167e21c6cc6a580c6382 (
plain)
1
2
3
4
5
6
7
8
9
10
|
require 'puppet/util/package'
Puppet::Parser::Functions::newfunction(:versioncmp, :doc => "Compares two versions.") do |args|
unless args.length == 2
raise Puppet::ParseError, "versioncmp should have 2 arguments"
end
return Puppet::Util::Package.versioncmp(args[0], args[1])
end
|