From a388b69b41e51626c1d632e2954e9fca0e97a1ee Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 2 Nov 2022 19:21:32 +0100 Subject: [PATCH] deps: check if pandoc and awk are installed - Checks if pandoc is installed. - Checks if awk is installed. - Closes #6. Co-Authored-by: iGor milhit --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 0aad768..366854f 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ .DEFAULT_GOAL:=help SHELL:=/bin/bash +pandoc=$(shell command -v pandoc) +pandoc_version=$(shell pandoc --version | sed -e 's/.* // ; 1q') +awk=$(shell command -v awk) + .PHONY: help deps help: ## Display this help @@ -13,3 +17,13 @@ help: ## Display this help deps: ## Check dependencies $(info Checking and getting dependencies) +ifeq ($(strip ($pandoc)),) + @echo "pandoc is required" +else + @echo "pandoc" $(pandoc_version) "is installed" +endif +ifeq ($(strip ($awk)),) + @echo "awk is required" +else + @echo "awk is installed" +endif -- 2.30.2