Kitware / KWStyle

Kitware Style Checker
Other
53 stars 30 forks source link

updateBoost.sh doesn't work on macOS because 'dirname' doesn't have '--version' option #73

Open seanm opened 6 years ago

seanm commented 6 years ago

@thewtex KWSys's updateBoost.sh script doesn't work on macOS because the macOS 'dirname' doesn't have a '--version' option.

Perhaps there is a different way to check that dirname exists?

If I remove that 'validate' section of code, the script then works.

thewtex commented 6 years ago

@seanm A better option may be the type built-in from bash:

https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script

seanm commented 6 years ago

On my Mac:

leprechaun:Desktop sean$ type dirname
dirname is /usr/bin/dirname