I\'m about to write a shell script to detect if several homebrew packages are installed in the system. Is there a way to use a brew command to achieve that?
I tried usin
Easiest two-liners: Step one, make sure it's installed
$ realpath . || brew install coreutils
This will print out the realpath of current dir, if not, then it will install it. And it will not fail even realpath not found.
Step two, call it in your actual code:
$ realpath ${someDir}