Skip to content

Instantly share code, notes, and snippets.

@davidsonfellipe
Last active December 11, 2015 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsonfellipe/4529914 to your computer and use it in GitHub Desktop.
Save davidsonfellipe/4529914 to your computer and use it in GitHub Desktop.
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