From 1f4778d44c7bd0a1480ac6de94a7c425b151869b Mon Sep 17 00:00:00 2001 From: Xavier Francisco Date: Wed, 24 Jun 2020 00:13:26 +0100 Subject: Handle multiple templates on Makefile --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 42e12b0..0636fe0 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ BUILD=pybase16 REPO=$(shell pwd) TEMPLATE=$(shell basename ${REPO}) -THEME_DIR=build_schemes +BUILD_DIR=build_schemes TEMPLATE_DIR=templates OUTPUT=output @@ -15,8 +15,9 @@ update: build: $(BUILD) build -t ${REPO} -o ${OUTPUT} - rm -rf ${THEME_DIR} - mv ${OUTPUT}/${TEMPLATE}/${THEME_DIR}/ ${THEME_DIR}/ + rm -rf ${BUILD_DIR} + mkdir ${BUILD_DIR} + cat templates/config.yaml | grep output | cut -d' ' -f6 | xargs -L1 -I {} mv ${OUTPUT}/${TEMPLATE}/{}/ ${BUILD_DIR}/ clean: rm -rf ${OUTPUT} ${TEMPLATE_DIR}/*/ -- cgit