veekun_pokedex/docker-entrypoint.sh

22 lines
411 B
Bash
Raw Normal View History

2017-06-09 02:20:25 +00:00
#!/usr/bin/env bash
set -e
POKEDEX_DIR=${POKEDEX_DIR:-"/project"}
cd ${POKEDEX_DIR}
if [ ! -f "${POKEDEX_DIR}/bin/python" ] || [ ! -f "${POKEDEX_DIR}/bin/pokedex" ] ; then
echo "Building the bin/pokedex executable ..."
virtualenv $POKEDEX_DIR --python=python2
bin/python setup.py develop
fi
case "$1" in
"") bin/pokedex help
;;
"exec") exec ${@:2}
;;
*) bin/pokedex $@
;;
esac