diff options
author | Dmitry Bogatov <KAction@gnu.org> | 2017-03-14 08:44:49 +0300 |
---|---|---|
committer | Dmitry Bogatov <KAction@gnu.org> | 2017-03-14 08:44:49 +0300 |
commit | 16c1e8ac96df9e81eec9c6eb83f05ca27fac47c2 (patch) | |
tree | 96edacedc66225480d03054d4f6afdf179542442 /2ff | |
parent | 7528abdfcea6a969dac0d3e0726668dcbc220d12 (diff) |
Patch 2ff script to suggest install imagemagick
Imagemagick is soft dependency of farbfeld -- usually user do not need
it, since conversion from jpeg and png -- the most common formats, are
built-it, but in more rare cases, when imagemagick *is* needed,
user-friendly error message apperars, suggesting to install required
package instead just complaining about missing `convert' binary.
Diffstat (limited to '2ff')
-rwxr-xr-x | 2ff | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -24,6 +24,11 @@ image/jpeg) jpg2ff < "$TMP" ;; *) + if [ ! -x /usr/bin/convert ] ; then + printf "%s: cant convert from %s -- missing \`convert' program" "$0" "$FORMAT" >&2 + printf "Run \`apt-get install imagemagick' to install it" >&2 + exit 1 + fi convert "$TMP" png:- 2>/dev/null | png2ff 2>/dev/null ;; esac |