Closed mattmackenzie closed 9 years ago
Helps to address #18
This looks reasonable to me.
This is better than what we have now but it requires that a user already knows they need to change the version of find. It would be better if we also checked at start up what version of find is being used and if it is not a GNU version just exit with an error message.
It's a quick fix for now that at least isn't too stinky. If I get a minute I'll see about trying to detect GNU find.
On Jun 13, 2015, at 7:49 PM, Dan Liew notifications@github.com wrote:
This looks reasonable to me.
This is better than what we have now but it requires that a user already knows they need to change the version of find. It would be better if we also checked at start up what version of find is being used and if it is not a GNU version just exit with an error message.
— Reply to this email directly or view it on GitHub.
if [[ $OSTYPE == darwin* ]]; then
type -P gfind &>/dev/null && FIND=gfind || echo "Please install fileutils using Home Brew."; exit 1;
fi
^^ works on linux and mac and can probably be adapted to other BSD flavours. I don't have access to any of them.
@mattmackenzie The above looks reasonable. The only thing I would change is instead of using echo is to use message error "Please install..."
which is function defined in unrarall which is designed for error messages.
@delcypher Ok, I have added that with your suggestion.
LGTM
If a user installs findutils on mac os x, they can leave findutils unlinked by using /usr/local/bin/gfind