Refactor procedure to install homebrew