aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-05-16 12:40:48 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-05-16 12:40:48 -0300
commit8da01a549ad018dd394887fc6554dab8975e36bc (patch)
tree666f57346c2ecf7943450c4969120e51f294b466 /share
parentf3c21b291be2f71a13db78445cdcd1185bbd1651 (diff)
downloadtemplater-8da01a549ad018dd394887fc6554dab8975e36bc.tar.gz
templater-8da01a549ad018dd394887fc6554dab8975e36bc.tar.bz2
Updates default Makefile
Diffstat (limited to 'share')
-rw-r--r--share/templater/templater/files/Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/share/templater/templater/files/Makefile b/share/templater/templater/files/Makefile
index 6dbbd98..3a988d4 100644
--- a/share/templater/templater/files/Makefile
+++ b/share/templater/templater/files/Makefile
@@ -7,7 +7,10 @@
# Port to serve content
HTTP_PORT="8000"
-HTTP_SERVER="SimpleHTTPServer"
+HTTP_SERVER="http.server"
+
+# Base to serve the content
+HTTP_BASE="."
# Set CONTAINER based in what we have available in the system
# This variable can be user in other, included Makefiles to handle virtualization tasks
@@ -24,10 +27,10 @@ endif
# See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200
# http://php.net/manual/en/features.commandline.webserver.php
serve:
- @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then python -m SimpleHTTPServer $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "http.server" ]; then python3 -m http.server $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "php" ]; then php -S localhost:$(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then cd $(HTTP_BASE) && python -m SimpleHTTPServer $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then cd $(HTTP_BASE) && PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "http.server" ]; then cd $(HTTP_BASE) && python3 -m http.server $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "php" ]; then cd $(HTTP_BASE) && php -S localhost:$(HTTP_PORT); fi
# Configure a git post-receive hook
post_receive: