#!/bin/bash

deactivate
set -e
set -x

hostname; whoami
cd /projects/stars/app

if [ ! -d robokop-interfaces ]; then
    git clone git@github.com:NCATS-Gamma/robokop-interfaces.git
    cd robokop-interfaces
else
    cd robokop-interfaces
    git pull
fi

venv () {
    venv=/projects/stars/robokopVenv
    if [ ! -d $venv ]; then
        python3.6 -m venv $venv
        source $venv/bin/activate
        pip install --upgrade pip
        if [ -f requirements.txt ]; then
            pip install -r requirements.txt
        fi
    fi
    source $venv/bin/activate
}
venv

cd smartBag
export PATH=$PWD/bin:$PATH
echo $PATH

cd example/ctd
