shithub: ugh

ref: 0f2ddfa2e4d8bbc1200fbb35e5006b375c4dbd56
dir: /mkfile/

View raw version
articles = `{walk -f data/ | grep -v '^data/\.git/'}
articles = ${articles:data/%=public/%}
md =    `{{for(i in $articles) echo $i}| grep '\.md$'}
txt =   `{{for(i in $articles) echo $i}| grep '\.txt$'}
shtml = `{{for(i in $articles) echo $i}| grep '\.shtml$'}
articles = ${md:   public/%.md=   public/%.html} \
           ${shtml:public/%.shtml=public/%.html} \
           $md $txt

all:V: $articles

clean:V:
	rm -rf $articles

public/%.html: data/%.md
	bin/md2html data/$stem.md $target

public/%.html: data/%.shtml
	cp data/$stem.shtml $target

public/%.md: data/%.md
	cp data/$stem.md $target

public/%.txt: data/%.txt
	cp data/$stem.txt $target