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?
# install if we haven't installed any version
brew ls --versions $lib || brew install $lib
# install if we haven't installed latest version
brew outdated $lib || brew install $lib