Very simple script that installs homebrew:
#!/bin/bash ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
The output gives:
==> This script will install: /usr/local/bin/brew /usr/local/Library/... /usr/local/share/man/man1/brew.1 Press RETURN to continue or any other key to abort
How do I press enter in a script like this? Would expect be the best route?
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
This is what yes
is for:
yes '' | ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With