#!/bin/sh

echo "Building mmCIF/DDL object dictionary"
rm -f ./mmcif_std.odb

../bin/CifLoader -ddl ./mmcif_ddl.dic -dict ./mmcif_std.dic -o ./mmcif_std.odb 2>&1 | tee ./mmcif_std.log

echo "DDL parser diagnostics" >> ./mmcif_std.log
cat DDLParser.log >> ./mmcif_std.log
echo "Dictionary parser diagnostics" >> ./mmcif_std.log
cat DICParser.log >> ./mmcif_std.log
echo "Dictionary consistency diagnostics" >> ./mmcif_std.log
cat Diagnostics.log >> ./mmcif_std.log

rm -f  ./DDLParser.log
rm -f  ./DICParser.log
rm -f  ./Diagnostics.log

chmod 644 ./mmcif_std.odb
