Browse Source

make sure makefile commands can handle spaces in article titles

pull/1/head
Brett Langdon 12 years ago
parent
commit
5d2e0203fc
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      Makefile

+ 6
- 4
Makefile View File

@ -10,13 +10,15 @@ preview:
add_article:
@echo "Enter Article Title: "
@read title;\
mkdir -p contents/is/writing/about/$$title;\
cat base.md | sed s/{title}/$$title/g | sed s/{date}/`date "+%Y-%m-%d"`/g> contents/is/writing/about/$$title/index.md;\
emacs contents/is/writing/about/$$title/index.md
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
remove_article:
@echo "Enter Article Title: "
@read title;\
rm -rf contents/is/writing/about/$$title
dir=`echo $$title | sed "s/ /-/g"`;\
rm -rf contents/is/writing/about/$$dir
.PHONY: build clean preview add_article remove_article

Loading…
Cancel
Save