shithub: epublish

ref: 9b5b3b2ceb13f4d89041c21d7c645ed3b8b5081b
dir: /mkfile/

View raw version
ebook:V: $ebook
	echo built $ebook

ms:V: $ms
	echo built $ms

$ebook:V: $textsource $ebooksource
	rfork
	ramfs
	for (f in $textsource/*){
		fname=`{basename $f | sed 's/\.[a-zA-Z0-9]*$//g'}
		txt2ebook $EBOOKARGS <$f >/tmp/$fname.xhtml
	}
	bind -a $ebooksource /tmp
	@{cd /tmp && zip .} >$target

$ms:V: $textsource $mssource
	rfork
	ramfs
	for (f in $textsource/*){
		fname=`{basename $f}
		txt2ms $MSARGS <$f >/tmp/$fname.ms
	}
	bind -a $mssource /tmp
	cat /tmp/* >$target