File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,27 @@ echo "Making ebooks ..."
3
3
DIR_DOWNLOADS=downloads
4
4
5
5
cd ../
6
+
7
+ # Check dependencies
6
8
if command -v pandoc & > /dev/null; then
7
9
echo " pandoc is installed"
8
10
else
9
11
echo " You need to install pandoc. Please visit: https://pandoc.org/installing.html"
10
12
exit 1
11
13
fi
14
+ if command -v epubcheck & > /dev/null; then
15
+ echo " epubcheck is installed"
16
+ else
17
+ echo " You need to install epubcheck. Please visit: https://www.w3.org/publishing/epubcheck/docs/installation/"
18
+ exit 1
19
+ fi
12
20
21
+ # Generate eBooks
13
22
pandoc -o $DIR_DOWNLOADS /typescript-book.epub --metadata title=" The Concise TypeScript Book" --metadata author=" Simone Poggiali" -s README.md
14
23
pandoc -o $DIR_DOWNLOADS /typescript-book-zh_CN.epub --metadata title=" # 简洁的TypeScript之书" --metadata author=" Simone Poggiali" -s README-zh_CN.md
15
24
25
+ # Validate eBooks
26
+ epubcheck $DIR_DOWNLOADS /typescript-book.epub
27
+ epubcheck $DIR_DOWNLOADS /typescript-book-zh_CN.epub
28
+
16
29
echo " Books were created. Please commit!"
You can’t perform that action at this time.
0 commit comments