The task passed the script `${shairport_sync_version}` - shell syntax in a Jinja field,
and the wrong variable name - which the Pi's shell expanded to nothing, so the script
fell back to its own default. Its `git reset` then ran outside the fresh clone, failed,
and was ignored without `set -e`: every build was simply upstream master. The script
now takes `pi_shairport_sync_version`, requires the argument, clones that tag directly
and stops on the first error. Bumped to 4.3.7.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
478 B
Bash
21 lines
478 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
VERSION=${1:?usage: build-shairport-sync.sh <git tag>}
|
|
|
|
# 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"
|