Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 43 lines (30 sloc) 1.743 kb
db9c357 Moving setup scripts to another repo
Ben Tilford authored
1 #! /bin/bash
2
3
4 echo "Enter scala version or hit enter for 1.9.0.1"
5 read version
6 if [ "$version" == "" ]
7 then
8 version="2.9.0.1"
9 fi
10 dl="scala-$version.tgz"
11 url="http://www.scala-lang.org/downloads/distrib/files/$dl"
12
13 echo "Setting up scala $version from $url"
14 sudo mkdir /opt/scala
15 cd /opt/scala
16 sudo wget "$url"
17 sudo tar xzf "$dl"
18 sudo rm "$dl"
19 sudo ln -s "/opt/scala/scala-$version" /opt/scala/latest
20
21
22 sudo update-alternatives --install /usr/bin/scala scala "/opt/scala/latest/bin/scala" 1
23 sudo update-alternatives --install /usr/bin/scala scala "/opt/scala/scala-$version/bin/scala" 2
24
25 sudo update-alternatives --install /usr/bin/scalac scalac "/opt/scala/latest/bin/scalac" 1
26 sudo update-alternatives --install /usr/bin/scalac scalac "/opt/scala/scala-$version/bin/scalac" 2
27
28 sudo update-alternatives --install /usr/bin/fsc fsc "/opt/scala/latest/bin/fsc" 1
29 sudo update-alternatives --install /usr/bin/fsc fsc "/opt/scala/scala-$version/bin/fsc" 2
30
31 sudo update-alternatives --install /usr/bin/sbaz sbaz "/opt/scala/latest/bin/sbaz" 1
32 sudo update-alternatives --install /usr/bin/sbaz sbaz "/opt/scala/scala-$version/bin/sbaz" 2
33
34 sudo update-alternatives --install /usr/bin/sbaz-setup sbaz-setup "/opt/scala/latest/bin/sbaz-setup" 1
35 sudo update-alternatives --install /usr/bin/sbaz-setup sbaz-setup "/opt/scala/scala-$version/bin/sbaz-setup" 2
36
37 sudo update-alternatives --install /usr/bin/scalap scalap "/opt/scala/latest/bin/scalap" 1
38 sudo update-alternatives --install /usr/bin/scalap scalap "/opt/scala/scala-$version/bin/scalap" 2
39
40 sudo update-alternatives --install /usr/bin/scaladoc scaladoc "/opt/scala/latest/bin/scaladoc" 1
41 sudo update-alternatives --install /usr/bin/scaladoc scaladoc "/opt/scala/scala-$version/bin/scaladoc" 2
42
Something went wrong with that request. Please try again.