Make gcheck-library.sh return meaningful exit codes