KWStyle
KWStyle copied to clipboard
updateBoost.sh doesn't work on macOS because 'dirname' doesn't have '--version' option
@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.
@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
On my Mac:
leprechaun:Desktop sean$ type dirname
dirname is /usr/bin/dirname