Corrected Debian path in checkexec function
authorAndrew Strong <andrew.david.strong@gmail.com>
Tue, 14 Jul 2015 08:23:47 +0000 (18:23 +1000)
committerAndrew Strong <andrew.david.strong@gmail.com>
Tue, 14 Jul 2015 08:23:47 +0000 (18:23 +1000)
This give installation instructions for Debian when an
application is not found. Broken with a change of filename
some time ago.

abcde

diff --git a/abcde b/abcde
index d6e8d48..c7c5710 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -356,12 +356,12 @@ checkexec ()
                if [ "$(which $X)" = "" ]; then
                        log error "$X is not in your path." >&2
                        log info  "Define the full path to the executable if it exists on your system." >&2
-                       if [ -e /etc/debian_release ] ; then
+                       if [ -e /etc/debian_* ] ; then
                                case $X in
                                        oggenc)         MISSING_PACKAGE=vorbis-tools ;;
                                        lame|flac)      MISSING_PACKAGE=$X ;;
                                esac
-                               log info "Hint: apt-get install $MISSING_PACKAGE" >&2
+                               log info "Hint: sudo apt-get install $MISSING_PACKAGE" >&2
                        fi
                        exit 1
                elif [ ! -x "$(which $X)" ]; then