95: def other
96: text = ""
97: with_contents = options[:references].length <= 1
98: exit_code = 0
99: require 'puppet/util/reference'
100: options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name|
101: raise "Could not find reference #{name}" unless section = Puppet::Util::Reference.reference(name)
102:
103: begin
104:
105: text += section.send(options[:format], with_contents)
106: rescue => detail
107: puts detail.backtrace
108: $stderr.puts "Could not generate reference #{name}: #{detail}"
109: exit_code = 1
110: next
111: end
112: end
113:
114: text += Puppet::Util::Reference.footer unless with_contents
115:
116: if options[:mode] == :pdf
117: Puppet::Util::Reference.pdf(text)
118: else
119: puts text
120: end
121:
122: exit exit_code
123: end