#!/bin/bash

SQL="mysql -u sfd -ptr33house MatrixTDB"

echo "DELETE FROM orig_source_profile;
DELETE FROM lt;
DELETE FROM feat_grp;
DELETE FROM lt_feat_grp;
DELETE FROM fltr_feat_grp;" | $SQL

echo "ALTER TABLE orig_source_profile AUTO_INCREMENT=1;
ALTER TABLE lt AUTO_INCREMENT=1;
ALTER TABLE feat_grp AUTO_INCREMENT=1;
ALTER TABLE lt_feat_grp AUTO_INCREMENT=1;
ALTER TABLE fltr_feat_grp AUTO_INCREMENT=1;" | $SQL

echo "y
p
Original harvester grammar.
 " | python import_from_itsdb.py harv_str/profile1/ harv_str/harv_mrs_1 harv_str/choices1

echo "p
English grammar for error checking" | python sql_lg_type.py test_grammars/pseudo_english/pseudo_english_choices

echo "p
Japanese grammar for error checking" | python sql_lg_type.py test_grammars/pseudo_japanese/pseudo_japanese_choices

python update_for_choices.py

echo

python status_for_choices.py
