Skip to content

Instantly share code, notes, and snippets.

@ushu
Last active January 4, 2016 08:48
Show Gist options
  • Save ushu/8597385 to your computer and use it in GitHub Desktop.
Save ushu/8597385 to your computer and use it in GitHub Desktop.
very basic script to install mac box for non devs
#!/usr/bin/env bash
# ask from install for xcode
if ! pkgutil --pkg-info=com.apple.pkg.CLTools_Executables >/dev/null; then
echo "Choisir \"Installer\" à droite puis attendre la fin de l'installation"
xcode-select --install
echo
read -p "Click to continue when xcode command line tools have been installed..."
echo
fi
if ! command -v brew >/dev/null; then
echo "*************************"
echo "* Will install Homebrew *"
echo "*************************"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
else
echo "*************************"
echo "* Will update Homebrew *"
echo "*************************"
brew update
fi
if [ ! -d ~/.rvm ]; then
echo "*************************"
echo "* Will install RVM *"
echo "*************************"
curl -sSL https://get.rvm.io | bash
fi
source ~/.rvm/scripts/rvm
if ! rvm list | grep 2.0.0-p353 >/dev/null; then
echo "*************************"
echo "* Will Install Ruby *"
echo "*************************"
brew install automake autoconf git curl
rvm install 2.0.0-p353
rvm use 2.0.0-p353 --default
gem install bundler
fi
if [ ! -d /Applications/GitHub.app ]; then
echo "*************************"
echo "Will Install Github tools"
echo "*************************"
wget "https://central.github.com/mac/latest" -O github.zip
unzip github.zip
mv Github.app /Applications
open -a "Github"
rm github.zip
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment