minor: tool to check if extension is installed

This commit is contained in:
Mike Dirolf 2009-07-17 13:29:38 -04:00
parent 706d06aee0
commit b934c997f9
1 changed files with 11 additions and 0 deletions

11
bin/fail_if_no_c.rb Normal file
View File

@ -0,0 +1,11 @@
# Fail if the C extension module isn't installed.
#
# Only really intended to be used by internal build scripts.
require 'rubygems'
require 'mongo'
begin
require 'mongo_ext/cbson'
rescue LoadError
Process.exit 1
end