Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Last active January 5, 2022 16:53
Show Gist options
  • Save ryanmaclean/4094dfdbb13e43656c3d41eccdceae05 to your computer and use it in GitHub Desktop.
Save ryanmaclean/4094dfdbb13e43656c3d41eccdceae05 to your computer and use it in GitHub Desktop.
Check if Homebrew is Installed Via Bash
#!/bin/sh
# Check to see if Homebrew is installed, and install it if it is not
command -v brew >/dev/null 2>&1 || { echo >&2 "Installing Homebrew Now"; \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }
@pnbrown
Copy link

pnbrown commented Jan 14, 2019

Thanks!

@maximebories
Copy link

maximebories commented Jan 1, 2022

Nice !

Edit: Maybe #!/bin/sh now that Apple is switching for ZSH ?

@ryanmaclean
Copy link
Author

Ah perhaps! Updated <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment