STYLE: use shell 'command' instead of 'which' in tutorials

This commit is contained in:
Mark Olesen
2017-07-07 16:00:57 +02:00
parent e7da4f0d07
commit 6afa62a6e4
11 changed files with 49 additions and 57 deletions

View File

@ -1,10 +1,10 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo "gnuplot not found - skipping graph creation" >&2
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
fi
}
gnuplot<<EOF
set terminal postscript eps color enhanced "Helvetica,20"