Files
MilkV-Duo/buildroot-2021.05/support/dependencies/check-host-gzip.sh
sam.xiang e38fbf739c [buildroot] create buildroot-2021.05 from github
repo: https://github.com/buildroot/buildroot/tree/2021.05
	commit: 69f79f2a2ee1417e19c1ead2c9226e11753c06cb

	Update for 2021.05

Change-Id: I77d6d14da04483c97cb172bf6732732012e538d9
2023-03-13 23:30:54 +08:00

22 lines
393 B
Bash
Executable File

#!/bin/sh
candidate="$1" # ignored
gzip="$(which gzip)"
if [ ! -x "${gzip}" ]; then
# echo nothing: no suitable gzip found
exit 1
fi
# gzip displays its version string on stdout
# pigz displays its version string on stderr
version="$("${gzip}" --version 2>&1)"
case "${version}" in
(*pigz*)
# echo nothing: no suitable gzip found
exit 1
;;
esac
printf "%s" "${gzip}"