From 0abc6ed072c731768b2abdb0082a00c5f6c74dc7 Mon Sep 17 00:00:00 2001 From: turmary Date: Sun, 27 Sep 2020 11:00:37 +0100 Subject: [PATCH] Add: checking current directory when installing --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index 69e011d..ad0ca61 100755 --- a/install.sh +++ b/install.sh @@ -48,6 +48,13 @@ for cmd in dtparam dtoverlay ; do errorFound=1 fi done + +if [ ! -x seeed-voicecard -o ! -f seeed-voicecard.service ]; then + echo "Please run this script in the project directory" + echo "which has files such as install.sh and seeed-voicecard.service" + errorFound=1 +fi + if [ $errorFound = 1 ] ; then echo "Errors found, exiting." 1>&2 exit 1