From d8814b5345f5da4d4fa2fb120b1e5fe6a5ca67c8 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 6 Mar 2024 16:35:01 -0700 Subject: [PATCH] Change the name of the default PDF to avoid renames. Add a filesize check. --- convert.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/convert.sh b/convert.sh index d87f043..de7e07a 100755 --- a/convert.sh +++ b/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