#!/bin/sh

rm -rf db/*.sys
rm -rf db/*.temp
rm -rf db/*.dbf
rm -rf db/*.log
rm -rf arch/*.dbf


echo "Recreating database ...\c"
../../src/cego --mode=create --dbxml=chkdb.xml --tableset=TS1
if [ $? -eq 0 ]
then
    echo " operation ok"
else
    echo " operation failed"
    exit 1
fi

echo "Importing database from binary ...\c" 
../../src/cego --mode=binimport --tableset=TS1 --dbxml=chkdb.xml --impfile=db/ts1.bin
