#! /bin/bash
#
# run-cogserver.sh
#
# Run everything needed for the language-learning word-pair counting
# pipeline. Starts the CogServer and opens the storage database.
#
# ----------------------
# Load config parameters
if [ -z $MASTER_CONFIG_FILE ]; then
echo "MASTER_CONFIG_FILE not defined!"
exit -1
fi
if [ -r $MASTER_CONFIG_FILE ]; then
source $MASTER_CONFIG_FILE
else
echo "Cannot find master configuration file!"
exit -1
fi
if ! [ -z ${PAIR_CONF_FILE} ] && [ -r ${PAIR_CONF_FILE} ]; then
source ${PAIR_CONF_FILE}
else
echo "Cannot find pair-counting configuration file!"
exit -1
fi
exec guile -l ${COMMON_DIR}/cogserver-pair.scm