#!/bin/bash set -e VERSION=${1:?usage: build-shairport-sync.sh } # Make a new temporary directory and go there tmp_dir=$(mktemp -d) cd "$tmp_dir" # Clone the requested tag, build and install git clone --depth 1 --branch "$VERSION" https://github.com/mikebrady/shairport-sync.git cd shairport-sync autoreconf -fi ./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd make make install # Clean up cd ~ rm -rf "$tmp_dir"