Adding requirements file check for python environment (#1067)

* Adding check for requirements file, in case user is simply using a source file and --src flag
* Adding bash check as per review comment
This commit is contained in:
Vishal
2019-01-22 10:26:21 +08:00
committed by Ta-Ching Chen
parent 68a511184f
commit 1dbb4f4fb7
+7 -1
View File
@@ -1,2 +1,8 @@
#!/bin/sh
pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}
set -euxo pipefail
if [ -f ${SRC_PKG}/requirements.txt ]
then
pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG}
fi
cp -r ${SRC_PKG} ${DEPLOY_PKG}