From: abn Date: Mon, 10 May 2021 12:40:09 +0000 (+0200) Subject: [ICoCo] Shell script to test equality between GitHub and MC version X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e7af441b65e6d0b6ecec3da8c47933377ff3477;p=tools%2Fmedcoupling.git [ICoCo] Shell script to test equality between GitHub and MC version --- diff --git a/src/ICoCo/github/check_consistency.sh b/src/ICoCo/github/check_consistency.sh new file mode 100755 index 000000000..c59374507 --- /dev/null +++ b/src/ICoCo/github/check_consistency.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# +# Check that the ICoCo headers used in MEDCoupling are well synchronized with the official ICoCo version +# hosted at: +# https://github.com/cea-trust-platform/icoco-coupling +# + +rm -rf icoco-coupling +rm -rf tmp_compare + +git clone https://github.com/cea-trust-platform/icoco-coupling.git + +lst="ICoCo_DeclSpec.hxx ICoCoField.h ICoCoField.hxx ICoCoMEDDoubleField.h ICoCoMEDDoubleField.hxx ICoCoMEDIntField.h ICoCoMEDIntField.hxx" + +mkdir tmp_compare +cd tmp_compare +for f in $lst; do + tail -n+4 ../icoco-coupling/include/$f > "${f}_github" + tail -n+20 ../../$f > "${f}_mc" + diff "${f}_github" "${f}_mc" + if [ ! $? -eq 0 ]; then + echo "File $f is not the same in MEDCoupling repository and in official ICoCo GitHub repository!!" + exit 1 + fi +done + +cd .. +rm -rf icoco-coupling +rm -rf tmp_compare +