-
Notifications
You must be signed in to change notification settings - Fork 977
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to verify 'struct bio_st' matching
- Loading branch information
1 parent
502d508
commit b81d865
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# make sure we have correct cwd | ||
pushd $(dirname $0) &>/dev/null | ||
trap 'popd &>/dev/null' EXIT | ||
|
||
echo "extracting 'struct bio_st' from './deps/libssl/openssl/crypto/bio/bio_local.h'" | ||
DEPBIOST=$(cd ../../; cat ./deps/libssl/openssl/crypto/bio/bio_local.h | sed -n '/^struct bio_st {/,/}/p') | ||
|
||
echo "extracting 'struct bio_st' from './lib/mysql_data_stream.cpp'" | ||
LIBBIOST=$(cd ../../; cat ./lib/mysql_data_stream.cpp | sed '/^\/\*/,/*\//d' | sed -n '/^struct bio_st {/,/}/p') | ||
|
||
echo -n "Comparing ... " | ||
if [[ "$LIBBIOST" == "$DEPBIOST" ]]; then | ||
echo "PASS - bio_st is a match!"; | ||
else | ||
echo "FAIL - bio_st does not match!"; | ||
exit 1 | ||
fi |