You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
393 B
21 lines
393 B
#!/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}"
|
|
|