Files
deb-python-dcos/cli/bin/env.sh
José Armando García Sancio 686826b020 dcos-635 refactor package for subcommand
Refactor the packaging so that subcommands can depend on the common
functionality without getting the executable artifacts.
2015-03-20 16:51:30 -07:00

27 lines
627 B
Bash
Executable File

#!/bin/bash -e
BASEDIR=`dirname $0`/..
if [ ! -d "$BASEDIR/env" ]; then
virtualenv -q $BASEDIR/env --prompt='(dcoscli) '
echo "Virtualenv created."
source $BASEDIR/env/bin/activate
echo "Virtualenv activated."
pip install -r $BASEDIR/requirements.txt
pip install -e $BASEDIR
echo "Requirements installed."
elif [ ! -f "$BASEDIR/env/bin/activate" -o "$BASEDIR/setup.py" -nt "$BASEDIR/env/bin/activate" ]; then
source $BASEDIR/env/bin/activate
echo "Virtualenv activated."
pip install -r $BASEDIR/requirements.txt
pip install -e $BASEDIR
echo "Requirements installed."
fi