exit with non-zero status if there are any errors

This commit is contained in:
Charlie Somerville 2013-12-03 15:14:09 +11:00
Родитель e150551910
Коммит 7fa6aafe51
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -14,9 +14,14 @@ symbols = `nm -gu #{ENV["SONAME"]} | grep -v GLIBC`.lines.map { |line|
symbol symbol
} }
errors = 0
symbols.each do |symbol| symbols.each do |symbol|
`grep -qr #{symbol} /usr/include/nagios` `grep -qr #{symbol} /usr/include/nagios`
next if $?.success? next if $?.success?
next if IGNORED_UNDEFINED_SYMBOLS.include?(symbol) next if IGNORED_UNDEFINED_SYMBOLS.include?(symbol)
errors += 1
puts "Undefined symbol reference `#{symbol}' does not appear to belong to nagios." puts "Undefined symbol reference `#{symbol}' does not appear to belong to nagios."
end end
exit errors.zero?