From b7bb57d0ccb218bf97f1531576e25acdb3fb7edf Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 3 Jun 2018 15:45:58 +0200 Subject: [PATCH] Added check for availabilit of ffplay. --- AAXtoMP3 | 7 +++++++ README.md | 1 + 2 files changed, 8 insertions(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index 3fa4de7..3398092 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -10,6 +10,13 @@ if [ -z ${HOME+x} ] && ! [ -z ${USERPROFILE+x} ]; then HOME="$USERPROFILE"; fi authcodeDirs="${HOME}/ ./" GREP=$(grep --version | grep -q GNU && echo "grep" || echo "ggrep") +if ! [ -x "$(command -v ffplay)" ] +then + echo "Please make sure that ffplay is installed and in your PATH." + echo "This is usually installed as a part of the ffmpeg package." + exit 1 +fi + if ! [[ $(type -P "$GREP") ]]; then echo "$GREP (GNU grep) is not in your PATH" echo "Without it, this script will break." diff --git a/README.md b/README.md index 3ce72dc..51f168d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ can obtain this string from a tool like [audible-activator](https://github.com/i ## Requirements * bash 4.3.42 or later tested * ffmpeg version 2.8.3 or later +* ffplay (usually installed as a part of ffmpeg) * libmp3lame (came from lame package on Arch, not sure where else this is stored) ## OSX