Change the name of the default PDF to avoid renames. Add a filesize check.
This commit is contained in:
parent
8a61ace684
commit
d8814b5345
10
convert.sh
10
convert.sh
@ -4,17 +4,21 @@
|
||||
|
||||
date
|
||||
|
||||
if [[ -e ebook.pdf ]]; then
|
||||
rm -v ebook.pdf
|
||||
ebook="HyperlingHealthProtocol.pdf"
|
||||
|
||||
if [[ -e $ebook ]]; then
|
||||
rm -v $ebook
|
||||
fi
|
||||
|
||||
pandoc ebook.md \
|
||||
-s -N --toc --toc-depth=3 \
|
||||
-o ebook.pdf
|
||||
-o $ebook
|
||||
status=$?
|
||||
|
||||
echo "Completed with status '$status'."
|
||||
|
||||
du -h $ebook
|
||||
|
||||
date
|
||||
|
||||
exit $status
|
||||
|
Loading…
x
Reference in New Issue
Block a user