Skip to content
Snippets Groups Projects
Commit 648a5b16 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Rectify the path munging

parent cb89cbd0
No related branches found
No related tags found
No related merge requests found
if [ ${#} -ne 1 ]; then
echo "The 1st parameter must be the requirements.txt file."
exit -1
fi
# Find the path to the device server's requirements.txt file
# on the Docker's host but relative to the /hosthome directory
# in Docker the user's # mounted ${HOME}).
# ATTENTION
# This is assuming that the device server's requirements.txt file
# exists # on the Docker's host in the user's ${HOME} directory.
runThis=$(basename ${0})
runThis=${runThis}/requirements.txt
if [ -f ${runThis} ]; then
requirements=$(basename ${1})
echo ${requirements}
if [ -f ${requirements} ]; then
myDir=${PWD}
else
myDir=${PWD}/$(dirname ${0})
myDir=${PWD}/$(dirname ${1})
fi
deviceServerPath=${myDir//${HOME}\//\/hosthome\/}
docker exec -it itango python3 -m pip install -r ${deviceServerPath}/requirements.txt
requirementsPath=${myDir//${HOME}\//\/hosthome\/}
docker exec -it itango python3 -m pip install -r ${requirementsPath}/${requirements}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment