Add files
This commit is contained in:
19
pythonVenv.sh
Executable file
19
pythonVenv.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
while getopts d: arg
|
||||
do
|
||||
case "${arg}" in
|
||||
d) TMP_DIR=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
ENV_DIR="${TMP_DIR=/tmp}"/.venv
|
||||
|
||||
if [ -d "${ENV_DIR}" ]; then
|
||||
. "${ENV_DIR}"/bin/activate
|
||||
else
|
||||
python3 -m venv "${ENV_DIR}"
|
||||
. "${ENV_DIR}"/bin/activate
|
||||
pip3 install wheel pyyaml jinja2-cli yamllint Cerberus
|
||||
fi
|
||||
Reference in New Issue
Block a user