Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
install mongodb
if ! which mongod >/dev/null 2>&1 ; then
if which brew >/dev/null 2>&1 ; then
echo "==> Installing brew (brew update)..."
brew update
echo "==> Installing mongodb (brew install mongodb)..."
brew install mongodb
elif which port >/dev/null 2>&1 ; then
echo "==> Installing mongodb (port install mongodb)..."
port install mongodb
else
echo "### You need to install Homebrew or MacPorts. ###"
open http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/#installing-from-10gen-builds
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.