#!/bin/sh version_gt() { test "$(printf '%s\n' "$@"| sort -V | head -n 1)" != "$1" } KERNEL_RECOMMENDED_VERSION="4.4.42" KERNEL_CURRENT_VERSION=`uname -r` if version_gt $KERNEL_RECOMMENDED_VERSION $KERNEL_CURRENT_VERSION; then echo "Your Linux kernel version ($KERNEL_CURRENT_VERSION) is below the recommended kernel version ($KERNEL_RECOMMENDED_VERSION)!" echo "Please upgrade it first by running the below command and following on screen instructions, and run Pisound install again!" echo echo "sudo rpi-update" exit 1 fi echo Importing Blokas GPG public key... wget -q -O - https://blokas.io/gpg.public.key | sudo apt-key add - echo Adding Blokas apt repository... sudo wget -q -O /etc/apt/sources.list.d/blokas.list https://blokas.io/blokas.list echo Updating package list... sudo apt-get update echo Installing Pisound software... sudo apt-get -y install pisound echo Updating /usr/local/pisound... sudo sh -c 'cd /usr/local/pisound && git -c user.name="blokas_installer" -c user.email="blokas@installer" stash && git pull' echo echo Now you may run 'sudo pisound-config' to customize your installation!