Very simple script that installs homebrew:
#!/bin/bash
ruby -e \"$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)\"
T
This is what yes is for:
yes '' | ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Per the lead maintainer of Homebrew:
echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Reading the source of https://raw.github.com/Homebrew/homebrew/go/install -- it only prompts if stdin is a TTY. If you redirect stdin from /dev/null
, it won't prompt at all. So:
ruby \
-e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" \
</dev/null
Press enter
if it asks to press return key
For more clarity of this,get hold of the brew docs
https://docs.brew.sh/
This works fine for me,
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null