Skip to content

Instantly share code, notes, and snippets.

@mko-x
Created May 10, 2015 06:04
Show Gist options
  • Save mko-x/19b19c34ea9ac8d63d57 to your computer and use it in GitHub Desktop.
Save mko-x/19b19c34ea9ac8d63d57 to your computer and use it in GitHub Desktop.
homebrew - check if one or more packages are installed
#!/bin/sh
for pkg in macvim ngrep other needed packages; do
if brew list -1 | grep -q "^${pkg}\$"; then
echo "Package '$pkg' is installed"
else
echo "Package '$pkg' is not installed"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment