Do not hardcode convert path but use which instead (bis)

This commit is contained in:
Gautier Pelloux-Prayer 2014-10-24 15:43:35 +02:00
parent d06c02273d
commit a0fcdd90d1

View file

@ -12,7 +12,7 @@ fi
CONVERT=$(which convert)
CONVERTFILTER="-sharpen 1x0.0 -filter Catrom"
OPTIPNG=/opt/local/bin/optipng
OPTIPNG=$(which optipng)
CMDS="${CONVERT} ${OPTIPNG}"
for i in $CMDS; do
command -v $i > /dev/null && continue || { echo "$i command not found"; exit 1; }