diff options
author | Caitlin Campbell <caitlin@cissols.com> | 2019-11-25 13:33:35 +0100 |
---|---|---|
committer | Caitlin Campbell <caitlin@cissols.com> | 2019-11-25 20:27:06 +0100 |
commit | fd3be389b94a4054d42fd63c15ab320139ac94f1 (patch) | |
tree | d291cbf98cae0aeb4dc0b68722b9b474b644a941 /Makefile | |
parent | b3fb11e4282a118591e8768935c7792f56ee0ebe (diff) |
Add cleaner python2/3 make serve command
Stop the need to Ctrl-C twice in the event where you have both python
versions on your system.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,8 +1,14 @@ +PYTHON3_AVAILABLE := $(shell python3 --version 2>&1) + site: ./makesite.py serve: site - cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server +ifeq ('$(PYTHON3_AVAILABLE)','') + cd _site && python -m SimpleHTTPServer +else + cd _site && python3 -m http.server +endif venv2: virtualenv ~/.venv/makesite |