From 7e8098139f1e8cb2346e9ad3c1787af193d8fea5 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 16 Jun 2020 22:41:09 +0100 Subject: Using type to see if pdftotext exists or not Until now we were using 'which' for this job, but throughout Maneage, we have used 'type', so to help in consistancy, we also use 'type' for this final command for this project also. --- project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'project') diff --git a/project b/project index 67ccc92..c117933 100755 --- a/project +++ b/project @@ -416,7 +416,7 @@ EOF # example when running './project make clean' there isn't any # 'paper.pdf'). if [ -f paper.pdf ]; then - if which pdftotext &> /dev/null; then + if type pdftotext > /dev/null 2>/dev/null; then numwords=$(pdftotext paper.pdf && cat paper.txt | wc -w) echo; echo "Number of words in full PDF: $numwords" rm paper.txt -- cgit v1.2.1