Skip to content
Snippets Groups Projects
itango_console.sh 701 B
Newer Older
# Find the path to this file that is relative to the
# /hosthome directory (in Docker the user's mounted ${HOME}).
# ATTENTION
# This is assuming that the this file exists
# on the Docker's host in the user's ${HOME} directory.
runThis=$(basename ${0})
if [ -f ${runThis} ]; then
    myDir=${PWD}
else
    myDir=${PWD}/$(dirname ${0})
fi
requirements=${runThis%%.sh}-requirements.txt
thisScriptPath=${myDir/${HOME}/\/hosthome}
if [ -f ${myDir}/${requirements} ]; then
    echo "Installing required Python modules with pip3..."
    docker exec -it itango pip3 install -r ${thisScriptPath}/${requirements}
    echo "Installing required Python modules with pip3 done."
fi