Skip to content

Instantly share code, notes, and snippets.

@lantrix
Forked from mnem/install_all_the_things.sh
Last active September 14, 2015 10:44
Show Gist options
  • Save lantrix/9bc2768e9ca1bf03de46 to your computer and use it in GitHub Desktop.
Save lantrix/9bc2768e9ca1bf03de46 to your computer and use it in GitHub Desktop.
Things to install on a fresh Mac: bash <(curl -fsSL https://gist.github.com/lantrix/9bc2768e9ca1bf03de46/raw/install.sh) - evolved into https://github.com/lantrix/boxen
#!/usr/bin/env bash
function execute_after_confirm {
read -p "$1 ($2) ? [y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
shift
for var in "$@"
do
echo $var
eval $var
return_code=$?
if [[ $return_code != 0 ]] ; then
exit $return_code
fi
done
fi
}
execute_after_confirm \
'Generate SSH keys' \
"ssh-keygen -t rsa -C \"`uname -n`\"" \
'pbcopy < ~/.ssh/id_rsa.pub ##### Copied key to clipboard #####'
execute_after_confirm \
'Install Homebrew' \
'ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"' \
'brew doctor'
ALL_THE_THINGS=\
'git'\
' git-flow'\
' jq'\
' gpg'\
' wget'
execute_after_confirm \
'Install useful packages' \
"brew install $ALL_THE_THINGS"
execute_after_confirm \
"Install RVM" \
"\\curl -sSL https://get.rvm.io | bash -s stable" \
execute_after_confirm \
"Install Homesick" \
'gem install homesick' \
'homesick clone lantrix/dotfiles-vim' \
'homesick symlink dotfiles-vim' \
'homesick clone lantrix/dotfiles' \
'homesick symlink dotfiles'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment