# run this script from the root of the mongo-c-driver repository.
|
# files we expect not to have these decls
|
exclude="\.\/src\/mongoc\/mongoc-macros.h|.\/src\/mongoc\/mongoc.h"
|
pattern="\.\/src\/mongoc\/mongoc.*[^private]\.h$"
|
|
# get all non-private headers
|
find -E ./src/mongoc -regex $pattern -not -regex $exclude | sort > /tmp/all.txt
|
|
# get all non-private headers with BSON_START_DECL
|
find -E ./src/mongoc -regex $pattern -not -regex $exclude | xargs grep -l "BSON_BEGIN_DECLS" | sort > /tmp/not_missing.txt
|
|
# check if there's any diff
|
diff -y /tmp/all.txt /tmp/not_missing.txt
|
|
# use return status of diff
|
exit $?
|