Skip to content

Instantly share code, notes, and snippets.

@yangsu
Last active October 12, 2020 01:48
Show Gist options
  • Save yangsu/4536661 to your computer and use it in GitHub Desktop.
Save yangsu/4536661 to your computer and use it in GitHub Desktop.
Install script Duke PL Course packages. http://duke-pl-course.github.com/about/
#!/bin/sh
################################################################################
#
# Install Script for
# * Build Tools
# * Homebrew
# * Ruby, Io, Prolog, Scala, Erlang, Clojure, and Haskell using homebrew
#
# Author: Yang Su
# GitHub: https://github.com/yangsu
#
################################################################################
# Colors
RESET="\033[0m\033[0;0m"
BOLD="\033[1m"
# Installation
# Check gcc
command -v gcc >/dev/null 2>&1 || {
echo "GCC not found. Please install GCC for your version of Mac OS X using the following link" >&2
open https://github.com/kennethreitz/osx-gcc-installer#option-1-downloading-pre-built-binaries
exit 1;
}
echo "Installing Homebrew (http://mxcl.github.com/homebrew/)"
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
# sudo mkdir /usr/local/Cellar
# sudo chown -R `whoami` /usr/local
brew doctor
echo "If you get \"${BOLD}Your system is raring to brew${RESET}\", Press enter to continue"
echo "Otherwise, please go to ${BOLD}http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/$RESET, scroll to ${BOLD}Step 3: Install Homebrew"
pause
brew update
brew install git
echo "Installing Ruby..."
brew install rbenv
brew install ruby-build
rbenv install 1.9.3-p194
rbenv global 1.9.3-p125
echo "Installing Io..."
brew install io
echo "Installing Prolog..."
brew install gnu-prolog
echo "Installing Scala..."
brew install scala
echo "Installing Erlang..."
brew install erlang
echo "Installing Clojure..."
brew install clojure
echo "Installing Haskell..."
brew install ghc
brew install haskell-platform
echo "You are all Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment