Files
2025-02-12 17:59:29 +08: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"