add script for gen epub

This commit is contained in:
yetist
2012-10-27 14:19:49 +08:00
parent 5a030b8051
commit c3abc9b6c7

17
genepub.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
if [ ! -f build-web-application-with-golang ];then
go build
fi
if [ ! -d tmp ];then
mkdir tmp
fi
cd tmp
cp ../*.md .
for i in *.md;do
sed -i '/^[#]\{1,\}/s!^\([#]\{1,\}\)\([^#]\{1,\}\)!\1 \2!' $i
sed -i '/!\[\](images/s#images\(.*\)?raw=true#../Images\1#' $i
done
../build-web-application-with-golang
rm *.md