Files
rpi-buildroot/support/dependencies/check-host-zstd.sh
Matt Staveley-Taylor 7d0707cae4 package: add support for extracting zstd archives
Teach the generic package handling code how to extract zstd (.tar.zst)
archives. When zstd is not installed on the host, host-zstd gets built
automatically.

Signed-off-by: Matt Staveley-Taylor <matt.stav.taylor@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-14 22:47:15 +02:00

15 lines
243 B
Bash
Executable File

#!/bin/sh
candidate="$1"
zstdcat=$(which "$candidate" 2>/dev/null)
if [ ! -x "$zstdcat" ]; then
zstdcat=$(which zstdcat 2>/dev/null)
if [ ! -x "$zstdcat" ]; then
# echo nothing: no suitable zstdcat found
exit 1
fi
fi
echo "$zstdcat"