

set -ex



test -f ${PREFIX}/opt/omnisci/bin/omnisci_server
test -f ${PREFIX}/opt/omnisci/bin/omnisci_initdb
test -f ${PREFIX}/opt/omnisci/bin/omnisql
test -f ${PREFIX}/opt/omnisci/bin/KafkaImporter
test -f ${PREFIX}/opt/omnisci/bin/StreamImporter
test -f "${PREFIX}/etc/conda/activate.d/omniscidb_activate.sh"
test -f "${PREFIX}/etc/conda/deactivate.d/omniscidb_deactivate.sh"
if [[ -x "$(command -v omnisql)" ]]
then
  echo "Found omnisql in PATH"
else
  echo "omnisql not found in PATH(=$PATH)" && exit 1
fi
source ${PREFIX}/etc/conda/deactivate.d/omniscidb_deactivate.sh
if [[ -x "$(command -v omnisql)" ]]
then
  echo "Unexpectedly found omnisql in PATH(=$PATH) after deactivation"  && exit 1
else
  echo "omnisql not in PATH after deactivation"
fi
source ${PREFIX}/etc/conda/activate.d/omniscidb_activate.sh

omnisql -v
which omnisci_initdb
which omnisci_server
mkdir data && omnisci_initdb data
omnisci_server --version
rm -rf data

which omnisci_insert_sample_data
which startomnisci
exit 0
