#!/bin/sh version_gt() { test "$(printf '%s\n' "$@"| sort -V | head -n 1)" != "$1" } KERNEL_RECOMMENDED_VERSION="4.14.39" 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... curl -s https://blokas.io/blokas-archive-keyring.gpg | sudo dd status=none of=/usr/share/keyrings/blokas-archive-keyring.gpg echo Adding Blokas apt repository... echo "deb [signed-by=/usr/share/keyrings/blokas-archive-keyring.gpg] http://blokas.io/apt/ rpi main" | sudo dd status=none of=/etc/apt/sources.list.d/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 --no-rebase' echo echo Now you may run \'sudo pisound-config\' to customize your installation!