Howto install scala no ubuntu de tar.gz

Instruções rápidas e sujas para instalar o scala no ubuntu

$ sudo mkdir -pf /usr/local/scala && cd /usr/local/scala
$ sudo wget http
://www.scala-lang.org/files/archive/scala-2.10.2.tgz && sudo tar xvfz scala-2.10.2.tgz
$ sudo update
-alternatives --install /usr/bin/scala scala /usr/local/scala/scala-2.10.2/bin/scala 1 --slave /usr/bin/scalac scalac /usr/local/scala/scala-2.10.2/bin/scalac --slave /usr/bin/scalap scalap /usr/local/scala/scala-2.10.2/bin/scalap --slave /usr/bin/scaladoc scaladoc /usr/local/scala/scala-2.10.2/bin/scaladoc --slave /usr/bin/fsc fsc /usr/local/scala/scala-2.10.2/bin/fsc
$ sudo echo
'SCALA_HOME=$(readlink -f /usr/bin/scala | sed "s:/bin/scala::")' > /etc/profile.d/scala.sh
$ sudo echo
'export SCALA_HOME' >> /etc/profile.d/scala.sh