difftastic/vendored_parsers/tree-sitter-hack/bin/require_fd

15 lines
240 B
Bash

#!/bin/bash
[ -n "$fd" ] && exit 0
if [[ "$(uname)" == Darwin* ]]; then
fd="$(command -v fd || echo "")"
else
fd="$(command -v fdfind || echo "")"
fi
if [ -z "$fd" ]; then
echo "fd is required for this script to work."
exit 1
fi