exit with non-zero status if there are any errors
This commit is contained in:
Родитель
e150551910
Коммит
7fa6aafe51
|
@ -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?
|
||||||
|
|
Загрузка…
Ссылка в новой задаче