From b2b84e7034b3d76c9a2de77e556d9813ae3f4618 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sun, 3 Jul 2016 23:48:18 +0100 Subject: [PATCH] Check for ffmpeg --- gifgen | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gifgen b/gifgen index 3585445..46b8d93 100755 --- a/gifgen +++ b/gifgen @@ -45,6 +45,12 @@ done # Show help and exit if we have no input [[ "$input" = "" ]] || [[ $show_help = true ]] && show_help && exit +# If we're not just showing help check we have ffmpeg +type ffmpeg >/dev/null 2>&1 || { + echo "Error: gifgen requires ffmpeg to be installed" + exit 1 +} + # Set output filename if not specified input_filename=${input##*/} output=${input_filename%.*}.gif