From b31296c658b481e711acf3353d335472ef271571 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Sat, 16 Nov 2013 08:51:14 -0500 Subject: [PATCH] cleanup makefile --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 95f571e..f876a34 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,27 @@ +WINTERSMITH = ./node_modules/.bin/wintersmith +ARTICLE_DIR = ./contents/is/writing/about + build: - ./node_modules/.bin/wintersmith build + @$(WINTERSMITH) build clean: - @ rm -rf build + @rm -rf build preview: - ./node_modules/.bin/wintersmith preview + @$(WINTERSMITH) preview add_article: @echo "Enter Article Title: " @read title;\ dir=`echo $$title | sed "s/ /-/g"`;\ - mkdir -p contents/is/writing/about/$$dir;\ - cat base.md | sed "s/{title}/$$title/g" | sed s/{date}/`date "+%Y-%m-%d"`/g> contents/is/writing/about/$$dir/index.md;\ - emacs contents/is/writing/about/$$dir/index.md + mkdir -p $(ARTICLE_DIR)/$$dir;\ + cat base.md | sed "s/{title}/$$title/g" | sed s/{date}/`date "+%Y-%m-%d"`/g> $(ARTICLE_DIR)/$$dir/index.md;\ + emacs $(ARTICLE_DIR)/$$dir/index.md remove_article: @echo "Enter Article Title: " @read title;\ dir=`echo $$title | sed "s/ /-/g"`;\ - rm -rf contents/is/writing/about/$$dir + rm -rf $(ARTICLE_DIR)/$$dir .PHONY: build clean preview add_article remove_article