aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-16 22:41:09 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-16 22:41:09 +0100
commit7e8098139f1e8cb2346e9ad3c1787af193d8fea5 (patch)
treedac868ca742815ddce4aeac8a212fc1c0a68e1c0
parent2a787ccb7b9c28097a678f50da05102bc9fb74a4 (diff)
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.
-rwxr-xr-xproject2
1 files changed, 1 insertions, 1 deletions
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