Skip to content

Instantly share code, notes, and snippets.

@dionedomingo
Last active May 12, 2021 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dionedomingo/786b5c8a919dd125b805673e936d0bf7 to your computer and use it in GitHub Desktop.
Save dionedomingo/786b5c8a919dd125b805673e936d0bf7 to your computer and use it in GitHub Desktop.
macos awscli awsume packer watch tfswitch
installDebug=false
function caskInstall() {
INSTALLSERVICE=$1
if brew info --cask $INSTALLSERVICE | grep "Not installed" > /dev/null; then
echo "installing $INSTALLSERVICE ..."
brew install --cask $INSTALLSERVICE
brew link --overwrite $INSTALLSERVICE 2>/dev/null 1>/dev/null
elif [ $installDebug = true ]; then
brew info --cask $INSTALLSERVICE
fi
}
function brewInstall() {
INSTALLSERVICE=$1
if ! brew ls --versions $INSTALLSERVICE > /dev/null; then
echo "installing $INSTALLSERVICE ..."
brew install $INSTALLSERVICE
brew link --overwrite $INSTALLSERVICE 2>/dev/null 1>/dev/null
elif [ $installDebug = true ]; then
brew info $INSTALLSERVICE
fi
}
echo Checking for MacOs binaries to install
uname -a
if ! brew help > /dev/null; then
echo Installing homebrew ...
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
brew --version
brew outdated
brew upgrade
brew outdated --cask
brew upgrade --cask
if ! pip3 help > /dev/null; then
echo "installing python & pip ..."
#brew install python2
brew install python3
fi
command -v python
command -v python2
command -v python3
#command -v pip
command -v pip3
brewInstall coreutils
brewInstall gcc
brewInstall go
brewInstall tree
brewInstall bat
brewInstall tmux
brewInstall gh
brewInstall terraform
brewInstall terraform-docs
brewInstall tfswitch
# brewInstall pre-commit
brewInstall tflint
#brewInstall minikube
#brewInstall hyperkit
#minikube config set driver hyperkit 2>/dev/null
#brewInstall helm
brewInstall kubectl
brewInstall eksctl
terraform -install-autocomplete 2>/dev/null
brewInstall jq
#brewInstall yq
#brewInstall gpg
brewInstall leiningen
if ! brew ls --versions nvm > /dev/null; then
echo "installing nvm ..."
brew install nvm
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
fi
if ! npm help > /dev/null; then
echo "installing npm ..."
nvm install 14
nvm default default 14
fi
echo "node: $(command -v node) $(node -v)"
brewInstall packer
brewInstall watch
brewInstall htop
brewInstall shellcheck
#brewInstall openconnect
brewInstall zsh
brewInstall zsh-completions
brewInstall zsh-autosuggestions
brewInstall zsh-syntax-highlighting
#brewInstall wtfutil
brewInstall awscli
brewInstall awsume
aws --version
if [ $(echo $SHELL) != "/bin/zsh" ]; then
echo "Detected wrong shell [${SHELL}], setting default to zsh."
chsh -s /bin/zsh
fi
if [ ! -d $HOME/.oh-my-zsh ]; then
echo fetching oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
if [ ! -f $HOME/.oh-my-zsh/themes/bullet-train.zsh-theme ]; then
echo "fetching oh-my-zsh bullet theme"
curl -L http://raw.github.com/caiogondim/bullet-train-oh-my-zsh-theme/master/bullet-train.zsh-theme \
-o $HOME/.oh-my-zsh/themes/bullet-train.zsh-theme
fi
if [ ! -d $HOME/fonts ]; then
echo "fetching powerline fonts"
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd $HOME
fi
zsh --version
if ! command -v it2check > /dev/null; then
echo "installing iterm2 integrations ..."
curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash
if [ $(echo $SHELL) = "/bin/zsh" ]; then
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
fi
if [ $(echo $SHELL) = "/bin/bash" ]; then
test -e "${HOME}/.iterm2_shell_integration.bash" && source ~/.iterm2_shell_integration.bash
fi
fi
#if ! ansible --version > /dev/null; then
# echo "installing ansible ..."
# /usr/local/bin/python3 -m pip install ansible
#fi
#ansible --version
# UFST
#if ! aws-adfs --version > /dev/null; then
# echo "installing aws-adfs ..."
# /usr/local/bin/python3 -m pip install aws-adfs
#fi
#aws-adfs --version
# Application casks
caskInstall docker
echo "docker: $(command -v docker) $(docker --version)"
caskInstall iterm2
caskInstall authy
caskInstall visual-studio-code
caskInstall postman
# brew tap adoptopenjdk/openjdk
# caskInstall adoptopenjdk13-jre
#caskInstall adobe-acrobat-reader
# browsers
if [ ! -d "$~/Applications/Google Chrome.app" ]; then
caskInstall google-chrome
fi
caskInstall firefox
#caskInstall brave-browser
#caskInstall microsoft-edge
# collab tools
caskInstall slack
caskInstall microsoft-teams
caskInstall webex
caskInstall webex-meetings
# caskInstall keybase
# fun
caskInstall vlc
#caskInstall deluge
caskInstall menumeters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment