Last active
September 19, 2016 23:27
-
-
Save billpatrianakos/903a59ad0518f4b72d8f6215e8df3f39 to your computer and use it in GitHub Desktop.
Commands to install everything a student needs during a web development class
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
#!/usr/bin/sh | |
# Install Fest 2.0 | |
## | |
# Welcome message | |
## | |
echo "################################" | |
echo "# Welcome to InstallFest v2.0 #" | |
echo "#==============================#" | |
echo "# This will install all of the #" | |
echo "# tools you need to work with #" | |
echo "# the technologies you learn #" | |
echo "# in this class. #" | |
echo "# #" | |
echo "# This program does not change #" | |
echo "# your system configuration or #" | |
echo "# any of your dotfiles except #" | |
echo "# where necessary (adding #" | |
echo "# paths to your environment #" | |
echo "# when installing RVM, nvm, #" | |
echo "# etc). #" | |
echo "################################" | |
echo "This tool will install:" | |
echo " - xcode command line tools" | |
echo " - RVM (Ruby version manager) and Ruby v2.3" | |
echo " - nvm (Node version manager) and Node.js v5.x (latest edge version)" | |
echo " - Homebrew (a package manager for OS X" | |
echo " - MySQL (a database)" | |
echo " - MongoDB (a non-relational database" | |
echo "\n\n" | |
echo -n "Will you allow this script to automatically install the software listed above? (y/n)? " | |
read answer | |
if echo "$answer" | grep -iq "^y" ;then | |
## | |
# Install xcode CLI tools | |
## | |
xcode-select --install | |
echo "\n\n#===> You have now installled thr xcode command line tools" | |
echo "\n\n#===> IMPORTANT: You will need to install Xcode itself later in this process manually. Instructions will be provided." | |
## | |
# Install RVM | |
## | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable | |
# Source .bashrc and .bash_profile (just in case) so you can use RVM | |
source ~/.bashrc | |
source ~/.bash_profile | |
echo "\n\n#===> RVM has been installed" | |
## | |
# Install Ruby | |
## | |
rvm install 2.3.0 | |
echo "\n\n#===> You now have the latest stable version of Ruby installed (2.3.0)" | |
## | |
# Install nvm | |
## | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | |
source ~/.bashrc | |
source ~/.bash_profile | |
echo "\n#===> NVM (Node Version Manager) has been installed" | |
## | |
# Install latest version of Node | |
## | |
nvm install 5 default | |
echo "\n\n#===> The latest version of Node.js has been installed" | |
## | |
# Install Homebrew | |
## | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
## | |
# Install MySQL | |
## | |
brew install mysql | |
echo "\n\n#===> MySQL is now installed" | |
## | |
# Install MongoDB | |
## | |
brew install mongodb | |
echo "\n\n#===> You have installed MongoDB" | |
echo -n "Does your Mac have the Mac App Store app installed? (y/n)" | |
read has_app_store | |
if echo "has_app_store" | grep -iq "^y" ;then | |
echo "Search for Xcode on the Mac App Store" | |
echo "Attempting to open the App Store application..." | |
open -a App\ Store | |
else | |
echo "You need to download Xcode from Apple's official website." | |
echo "Attempting to navigate to https://developer.apple.com/xcode/download/ using Google Chrome..." | |
open -a Google\ Chrome https://developer.apple.com/xcode/download/ | |
fi | |
echo "\n" | |
echo "#######################################################" | |
echo "# You should now have all the required software for #" | |
echo "# this course. If you have not installed Xcode yet do #" | |
echo "# so by searching for it on the App Store or head to #" | |
echo "# https://developer.apple.com/xcode/download/ to #" | |
echo "# download it manually. #" | |
echo "#-----------------------------------------------------#" | |
echo "# You may also want to download some of these great #" | |
echo "# (but optional) helpful tools: #" | |
echo "# * DB Browser for SQLite: http://sqlitebrowser.org #" | |
echo "# * Postman: https://www.getpostman.com #" | |
echo "# * Robomongo (MongoDB GUI): https://robomongo.org #" | |
echo "#######################################################" | |
else | |
echo "Quitting InstallFest. Run me again when you're ready to install the required tools." | |
fi | |
## | |
# BONUS STUFF FOR LATER? | |
# ---------------------- | |
# 1. Colorize terminal | |
# 2. Install better terminal themes | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment