Salome HOME
[ICoCo] renamed header and symbol for decl spec
[tools/medcoupling.git] / src / ICoCo / github / check_consistency.sh
1 #!/bin/bash
2
3 #
4 # Check that the ICoCo headers used in MEDCoupling are well synchronized with the official ICoCo version 
5 # hosted at:
6 #   https://github.com/cea-trust-platform/icoco-coupling
7 #
8
9 rm -rf icoco-coupling
10 rm -rf tmp_compare
11
12 git clone https://github.com/cea-trust-platform/icoco-coupling.git
13
14 lst="ICoCo_DeclSpec.hxx ICoCoField.h ICoCoField.hxx ICoCoMEDDoubleField.h ICoCoMEDDoubleField.hxx ICoCoMEDIntField.h ICoCoMEDIntField.hxx"
15
16 mkdir tmp_compare
17 cd tmp_compare
18 for f in $lst; do
19     tail -n+4 ../icoco-coupling/include/$f > "${f}_github"
20     tail -n+20 ../../$f > "${f}_mc"
21     diff "${f}_github" "${f}_mc"
22     if [ ! $? -eq 0 ]; then
23         echo "File $f is not the same in MEDCoupling repository and in official ICoCo GitHub repository!!"
24         exit 1
25     fi
26 done
27
28 cd ..
29 rm -rf icoco-coupling
30 rm -rf tmp_compare
31