#!/bin/bash fancy_echo() { local fmt="$1"; shift # shellcheck disable=SC2059 printf "\n$fmt\n" "$@" } fancy_echo "1.3" # Install Xcode Command Line Tools. xcode-select --install # # Check if Homebrew is installed # which -s brew if [[ $? != 0 ]] ; then # Install Homebrew fancy_echo "Installing Homebrew ..." /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" else fancy_echo "Updating Homebrew ..." brew update fi fancy_echo "Installing Ansible ..." brew install ansible echo -e "\n" read -p "Generate new (and backup any current) SSH keys? (y):" createkey