Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automate homebrew installation?

I'm deploying stuff on some unix machines and I need to get home-brew installed without any user prompt. Currently, the only way I found to install home-brew is to run this ruby script:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

But this has user prompts and cannot be fully automated. Can anyone suggest a way to install this without user prompts?

like image 700
semantic_c0d3r Avatar asked Aug 04 '14 22:08

semantic_c0d3r


Video Answer


1 Answers

The current implementation of the Homebrew installation script will prompt the User if stdin is set to TTY. By redirecting stdin to /dev/null, the installer can be run without user intervention.

'ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null'

Enjoy Peteris Krumins' awesome reference: Bash Redirections Cheat Sheet.

like image 125
ziff Avatar answered Oct 03 '22 10:10

ziff