diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-09 03:55:11 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-09 03:55:11 +0100 |
commit | efb0582d899fb3c660773ba5879a38e1b147c258 (patch) | |
tree | c26048bc0bef414d95446da942f20bb79fb524f0 /project | |
parent | 4646fa400796ac6b46e07429c43537475d953dff (diff) |
Two minor corrections to avoid warnings in make and make clean
There were two small warnings that are removed with this commit:
- In the end, when we print the number of words in the PDF, we hadn't
accounted for the fact that 'paper.pdf' doesn't always exist (for
example when './project make clean' is run). So a check was added to
only print the number of words when a PDF exists.
- I noticed that the '$(texdir)/to-publish' directory was being built both
in 'initialize.mk' and in 'demo-plot.mk'. So the one in 'demo-plot.mk'
has been removed.
Diffstat (limited to 'project')
-rwxr-xr-x | project | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -411,11 +411,16 @@ EOF # Run the actual project. controlled_env reproduce/analysis/make/top-make.mk - # Print the number of words (if the user has pdftotext. - if which pdftotext &> /dev/null; then - numwords=$(pdftotext paper.pdf && cat paper.txt | wc -w) - echo; echo "Number of words in full PDF: $numwords" - rm paper.txt + # Print the number of words (if the user has pdftotext outside of + # Maneage! For now!!!), AND there actually is a 'paper.pdf' (for + # example when running './project make clean' there isn't any + # 'paper.pdf'). + if [ -f paper.pdf ]; then + if which pdftotext &> /dev/null; then + numwords=$(pdftotext paper.pdf && cat paper.txt | wc -w) + echo; echo "Number of words in full PDF: $numwords" + rm paper.txt + fi fi ;; |