Skip to content

Instantly share code, notes, and snippets.

@andre3k1
Created August 1, 2013 01:24
Show Gist options
  • Save andre3k1/6127722 to your computer and use it in GitHub Desktop.
Save andre3k1/6127722 to your computer and use it in GitHub Desktop.
Install Scala and add it to your machine's PATH environment variable. This script is compatible with all Unix-like machines.
#!/bin/sh
export SCALA_VERSION=2.9.2 # This is the only configuration setting
sudo curl -O http://www.scala-lang.org/files/archive/scala-$SCALA_VERSION.tgz
sudo tar -zxf scala-$SCALA_VERSION.tgz
sudo rm -rf scala-$SCALA_VERSION.tgz
sudo mv scala-$SCALA_VERSION /usr/local
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scala /usr/bin/scala
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scalac /usr/bin/scalac
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/fsc /usr/bin/fsc
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/sbaz /usr/bin/sbaz
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/sbaz-setup /usr/bin/sbaz-setup
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scaladoc /usr/bin/scaladoc
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scalap /usr/bin/scalap
sudo chmod a+x -R /usr/local/scala-2.9.2/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment