Skip to content

Instantly share code, notes, and snippets.

@benevolent0505
Last active July 2, 2016 04:36
Show Gist options
  • Save benevolent0505/ba7d8284398e9cb7bf75 to your computer and use it in GitHub Desktop.
Save benevolent0505/ba7d8284398e9cb7bf75 to your computer and use it in GitHub Desktop.
# Install Scala
execute 'download scala' do
command 'cd ~/tmp; wget http://downloads.typesafe.com/scala/2.11.6/scala-2.11.6.tgz'
not_if 'scala -v'
end
execute 'unzip tar file' do
command 'tar xzvf ~/tmp/scala-2.11.6.tgz /usr/local/'
not_if 'test -d /usr/local/scala'
end
execute 'link scala path' do
command 'ln -s /usr/local/scala-2.11.6 /usr/local/scala'
end
execute 'add SCALA_HOME' do
command %Q(echo 'export SCALA_HOME="/usr/local/scala"' >> ~/.bashrc)
not_if "cat ~/.bashrc | grep SCALA_HOME"
end
execute 'add PATH' do
command %q(echo 'export PATH=$SCALA_HOME/bin:$PATH' >> ~/.bashrc)
not_if "cat ~/.bashrc | grep SCALA_HOME"
end
# Install sbt
execute 'add to list sbt' do
command 'echo "deb http://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list'
end
execute 'sudo apt-get update'
package 'sbt' do
action :install
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment