From 37a3d898d4afee5ac4b107dfc7505f4ac34442eb Mon Sep 17 00:00:00 2001
From: Orestis <orestis.malaspinas@pm.me>
Date: Sat, 19 Feb 2022 21:03:16 +0100
Subject: [PATCH] added puppeteer target

---
 slides/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/slides/Makefile b/slides/Makefile
index 3dc6293..89363fd 100644
--- a/slides/Makefile
+++ b/slides/Makefile
@@ -21,6 +21,7 @@ MD=$(wildcard *.md) # Tous les fichiers .md
 PDF=$(MD:%.md=%.pdf) # Pour les fichier pdf on transforme .md -> .pdf
 HTML=$(MD:%.md=%.html) # Pour les fichier html on transforme .md -> .html
 MARKDOWN=$(MD:%.md=%.markdown) # Pour les fichier markdown on transforme .md -> .markdown
+CHROMIUM:=$(shell which chromium)
 
 all: $(PDF) $(HTML) # La cible par défaut (all) exécute les cibles %.pdf
 
@@ -31,7 +32,7 @@ docker_clean: docker-compose.yml
 	docker-compose run slides make clean -k || true
 
 puppeteer:
-	@echo -e "{\n\"executablePath\": \"/usr/bin/chromium\",\n\"args\": [\"--no-sandbox\"]\n}" > .puppeteer.json
+	@echo -e "{\n\"executablePath\":" \"$(CHROMIUM)\" ",\n\"args\": [\"--no-sandbox\"]\n}" > .puppeteer.json
 
 index:
 	rm -f index.md
-- 
GitLab