From 98bf3abdbfd249b6174618d4f83150a6624c0a01 Mon Sep 17 00:00:00 2001 From: Lilian Roller Date: Fri, 7 Feb 2020 14:52:28 +0100 Subject: [PATCH] Improve Makefile with python module option --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b550594..28fb80e 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,18 @@ install: sudo pip3 install lektor --upgrade build: - python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS) + if python3 -m lektor --version 2>/dev/null; then + python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS) + else + lektor build $(LEKTOR_PLUGIN_FLAGS) + fi server: - python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS) + if python3 -m lektor --version 2>/dev/null; then + python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS) + else + lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS) + fi deploy: lektor clean --yes