Add: checking current directory when installing

This commit is contained in:
turmary 2020-09-27 11:00:37 +01:00
parent 30216a9c7c
commit 0abc6ed072

View file

@ -48,6 +48,13 @@ for cmd in dtparam dtoverlay ; do
errorFound=1 errorFound=1
fi fi
done 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 if [ $errorFound = 1 ] ; then
echo "Errors found, exiting." 1>&2 echo "Errors found, exiting." 1>&2
exit 1 exit 1