summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunaina Pai <sunainapai.in@gmail.com>2021-01-03 22:01:43 +0530
committerSunaina Pai <sunainapai.in@gmail.com>2021-01-03 22:01:43 +0530
commit8f40bc5395a6034fdcddc1ccaa04ed292b78c94e (patch)
tree90825aee93fc62efb0ad8fe7aa6a36faf43a1e9c
parent1368d8d5ba79b7e5497210e24af3d2aa1f76cc2c (diff)
Let make serve fail if cd _site fails
-rw-r--r--Makefile9
1 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0bfefd7..af9912e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,16 +4,13 @@ site:
serve: site
if python3 -c 'import http.server' 2> /dev/null; then \
echo Running Python3 http.server ...; \
- cd _site; \
- python3 -m http.server; \
+ cd _site && python3 -m http.server; \
elif python -c 'import http.server' 2> /dev/null; then \
echo Running Python http.server ...; \
- cd _site; \
- python -m http.server; \
+ cd _site && python -m http.server; \
elif python -c 'import SimpleHTTPServer' 2> /dev/null; then \
echo Running Python SimpleHTTPServer ...; \
- cd _site; \
- python -m SimpleHTTPServer; \
+ cd _site && python -m SimpleHTTPServer; \
else \
echo Cannot find Python http.server or SimpleHTTPServer; \
fi