#!/bin/bash

# Avoid cuda and cpu variants of omniscidb in the same environment.
if [[ ! -z "${PATH_CONDA_OMNISCIDB_BACKUP+x}" ]]
then
  echo "Unset PATH_CONDA_OMNISCIDB_BACKUP(=${PATH_CONDA_OMNISCIDB_BACKUP}) when activating omniscidb from ${CONDA_PREFIX}/opt/omnisci"
  export PATH="${PATH_CONDA_OMNISCIDB_BACKUP}"
  unset PATH_CONDA_OMNISCIDB_BACKUP
fi

# Backup environment variables (only if the variables are set)
if [[ ! -z "${PATH+x}" ]]
then
  export PATH_CONDA_OMNISCIDB_BACKUP="${PATH:-}"
fi

export PATH="${CONDA_PREFIX}/opt/omnisci/bin:${PATH}"

