From e5742076568e6361c2ca23415ded02405a120cb0 Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Thu, 15 Dec 2016 23:14:42 -0600 Subject: [PATCH] move venv logic to makefile --- Makefile | 3 +++ run | 11 ++--------- 2 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..63b13f5 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +venv: + python3 -m venv venv + sh -c '. venv/bin/activate; pip install -e .' diff --git a/run b/run index e1f2787..2fad251 100755 --- a/run +++ b/run @@ -1,13 +1,6 @@ #!/bin/bash VENV_DIR="venv" - -if [ ! -d "$VENV_DIR" ]; then - python3 -m venv venv - . "$VENV_DIR/bin/activate" - pip install -e . -else - . "$VENV_DIR/bin/activate" -fi - +make "$VENV_DIR" +. "$VENV_DIR/bin/activate" tge $@