From 483138635415b4b28522a46c7108727bbff32336 Mon Sep 17 00:00:00 2001 From: Christian Buysschaert Date: Sat, 1 Dec 2018 04:44:54 +0000 Subject: [PATCH] Update QBO_Installer.sh --- scripts/QBO_Installer.sh | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/scripts/QBO_Installer.sh b/scripts/QBO_Installer.sh index 50afe13..86e9d6f 100755 --- a/scripts/QBO_Installer.sh +++ b/scripts/QBO_Installer.sh @@ -1,6 +1,6 @@ #!/bin/bash -## QBO Installer v1.0 +## QBO Installer v1.1 # Parameters @@ -21,22 +21,13 @@ function INSTALL_OR_UPDATE_DEPENDENCIES { apt-get upgrade -y # Install apt dependencies - apt-get install raspberrypi-kernel-headers git python-pip python-pil python-opencv python-numpy python-pigpio python-zbar python-urllib3 python-serial python-simplejson python-pyasn1-modules python-yaml alsa-base esound-common libttspico-utils portaudio19-dev flac espeak libwebsockets-dev winbind libnss-winbind samba libffi-dev libssl-dev libmpg123-dev swig swig3.0 sox python-pyaudio libatlas-base-dev ffmpeg -y + apt-get install raspberrypi-kernel-headers git python-pip python-pil python-opencv python-numpy python-pigpio python-zbar python-urllib3 python-serial python-simplejson python-pyasn1-modules python-yaml alsa-base esound-common libttspico-utils portaudio19-dev flac espeak libwebsockets-dev winbind libnss-winbind samba libffi-dev libssl-dev libmpg123-dev swig swig3.0 sox python-pyaudio libatlas-base-dev ffmpeg libhdf5-serial-dev hdf5-tools -y # Install python dependencies - /usr/bin/pip install apiai argparse google-assistant-grpc google-assistant-library google-assistant-sdk google-oauth SpeechRecognition PyAudio Django==1.11.13 djangorestframework==3.8.2 pyyaml==3.13 pyOpenSSL==18.0.0 pyasn1 watson-developer-cloud youtube-dl dialogflow + /usr/bin/pip install apiai argparse google-assistant-grpc google-assistant-library google-assistant-sdk google-oauth SpeechRecognition PyAudio Django djangorestframework pyyaml pyOpenSSL pyasn1 watson-developer-cloud youtube-dl dialogflow /usr/bin/pip install -U pyasn1 /usr/bin/pip install --no-cache-dir tensorflow - # Install MyCroft Software - - /usr/bin/git clone -b master https://github.com/MycroftAI/mycroft-core.git /opt/qbo/mycroft-core - bash /opt/qbo/mycroft-core/dev_setup.sh --allow-root - - /usr/bin/pip3 install certifi monotonic - - sed -i 's/paplay %1 --stream-name=mycroft-voice/aplay -D convertQBO %1/g' /opt/qbo/mycroft-core/mycroft/configuration/mycroft.conf - # Remove old packages apt-get autoclean -y apt-get autoremove --purge -y @@ -46,8 +37,8 @@ function INSTALL_OR_UPDATE_DEPENDENCIES { if [ ! -d "/lib/modules/$(uname -r)" ] then # Show Warning - printf "\n**WARNING**\nThe kernel has changed after updating the system. Please, reboot the system and re-run the install/update script.\n" - + printf "\n**WARNING**\nThe kernel has changed after updating the system.\nPlease, reboot the system and re-run the install/update script.\n" + # Wait to user confirmation read -n 1 -s -r -p "Press any key to reboot" @@ -116,14 +107,13 @@ function INSTALL { clear # Presentation - printf "\n ** QBO Installer **\n\nThis software will update the Raspbian, install the dependencies and install the QBO Software. Once the installation is complete, the system will reboot and the QBO Software will be ready.\n\nNOTICE: It is recommended to perform this installation on a clean Raspbian Stretch image.\n\n" - read -n 1 -s -r -p "Press any key to continue" + printf "\n ** QBO Installer **\n\nThis software will update the Raspbian, install the dependencies\nand install the QBO Software. Once the installation is complete,\nthe system will reboot and the QBO Software will be ready.\n\nNOTICE: It is recommended to perform this installation\non a clean Raspbian Stretch image.\n\n" read -n 1 -s -r -p "Press any key to continue" clear # Additional Screen if install from development repositories if [ ${REPO_QBO_BRANCH} == "develop" ] then - printf "\n ** QBO Installer **\n\n**WARNING**\nAre you sure you want to install from the development repositories? The development version is unstable and may contain critical errors.\n\n" + printf "\n ** QBO Installer **\n\n**WARNING**\nAre you sure you want to install from the development repositories?\nThe development version is unstable and may contain critical errors.\n\n" read -n 1 -s -r -p "Press any key to continue or Ctrl+C to cancel" clear fi @@ -137,7 +127,7 @@ function INSTALL { # Ask distribution while [ ${DISTRO} != 'standalone' ] && [ ${DISTRO} != 'ibmwatson' ] do - read -r -p "Enter number of distribution and press enter:" DISTRONUM + read -r -p "Enter number of distribution and press enter: " DISTRONUM case "$DISTRONUM" in 1) DISTRO='standalone' @@ -339,6 +329,15 @@ pcm.convertQBO { exit 1 esac + # Install MyCroft Software + + /usr/bin/git clone -b master https://github.com/MycroftAI/mycroft-core.git /opt/qbo/mycroft-core + bash /opt/qbo/mycroft-core/dev_setup.sh --allow-root + + /usr/bin/pip3 install certifi monotonic + + sed -i 's/paplay %1 --stream-name=mycroft-voice/aplay -D convertQBO %1/g' /opt/qbo/mycroft-core/mycroft/configuration/mycroft.conf + # Show action info printf "Complete! Rebooting in 5 seconds...\n" -- GitLab