pkill37 / linuxify

🍏🐧 Transparently transform the macOS CLI into a fresh GNU/Linux CLI experience.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brew requirement

pkill37 opened this issue · comments

I just realized I don't check if brew is installed or do anything about it. Should I?

Yeah, you should. Check out this snipet, I've had it from working on my automation script and may be useful to you:

# Homebrew
printf "Checking for Homebrew... "
if ! command -v brew > /dev/null; then
	printf "Homebrew not installed! Installing Homebrew...\n"
 	ruby -e "$(curl --location --fail --silent --show-error https://raw.githubusercontent.com/Homebrew/install/master/install)"
	export PATH="/usr/local/bin:$PATH"
	printf "export PATH=\"/usr/local/bin:$PATH\"\n" >> $HOME/.bash_profile
else
	printf "Homebrew installed.\n"
fi

printf "Updating Homebrew...\n"
brew update
``
`