Created
November 24, 2018 10:46
-
-
Save raditotev/fe133c4528dbe4d9dfe3a2b67611328e to your computer and use it in GitHub Desktop.
Setup ruby automation tests environment (Mac only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $OSTYPE != "darwin"* ]]; then | |
echo "This script is for Mac machines only" | |
exit | |
fi | |
if ! type "rvm" > /dev/null; then | |
echo "Install RVM and Ruby" | |
if ! type "gpg" > /dev/null; then | |
echo "Install Brew" | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
echo "Install gnupg" | |
brew install gnupg | |
fi | |
echo "Install RVM" | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
\curl -sSL https://get.rvm.io | bash | |
echo "Install Ruby 2.5.1" | |
rvm install ruby-2.5.1 | |
echo "Install bundler" | |
gem install bundler | |
fi | |
if ! type "mysql" > /dev/null; then | |
echo "Install MySQL" | |
brew install mysql@5.7 | |
echo "Start MySQL" | |
brew services start mysql@5.7 | |
fi | |
if ! type "chromedriver" > /dev/null; then | |
echo "Install chromedriver" | |
brew install chromedriver | |
echo "Start chromedriver" | |
brew services start chromedriver | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment