Skip to content
Snippets Groups Projects
Commit 84191ff1 authored by ag87zypi's avatar ag87zypi
Browse files

check for existence of pdftk

parent 9226f6dd
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
## v2 23-12-23 alban: add help text and error message ## v2 23-12-23 alban: add help text and error message
## v3 24-01-15 alban: add acceptance for wildcard * ## v3 24-01-15 alban: add acceptance for wildcard *
## v4 24-01-17 alban: add file type check ## v4 24-01-17 alban: add file type check
## v5 24-01-23 alban: add binary check
## ##
...@@ -17,6 +18,18 @@ helptext () { ...@@ -17,6 +18,18 @@ helptext () {
} }
## check for binaries needed ## check for binaries needed
## give needed binaries as space-seperated entries in variable $progs2check
##
progs2check="pdftk"
##
for prog in $progs2check; do
if ! which "$prog" > /dev/null; then
echo "\n ERROR: Couldn't find the program $prog. \n"
exit 1
fi
done
## help request as parameter
# TBD # TBD
## no parameter ## no parameter
...@@ -25,9 +38,6 @@ if [ -z "$1" ]; then ...@@ -25,9 +38,6 @@ if [ -z "$1" ]; then
helptext helptext
exit 0 exit 0
fi fi
## help request as parameter
# TBD
## set internal field separator (IFS) because of possible spaces in file names ## set internal field separator (IFS) because of possible spaces in file names
IFS=" IFS="
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment