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
|
date
|
||||||
|
|
||||||
if [[ -e ebook.pdf ]]; then
|
ebook="HyperlingHealthProtocol.pdf"
|
||||||
rm -v ebook.pdf
|
|
||||||
|
if [[ -e $ebook ]]; then
|
||||||
|
rm -v $ebook
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pandoc ebook.md \
|
pandoc ebook.md \
|
||||||
-s -N --toc --toc-depth=3 \
|
-s -N --toc --toc-depth=3 \
|
||||||
-o ebook.pdf
|
-o $ebook
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
echo "Completed with status '$status'."
|
echo "Completed with status '$status'."
|
||||||
|
|
||||||
|
du -h $ebook
|
||||||
|
|
||||||
date
|
date
|
||||||
|
|
||||||
exit $status
|
exit $status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user