Skip to content

Instantly share code, notes, and snippets.

@mazgi
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazgi/9522035 to your computer and use it in GitHub Desktop.
Save mazgi/9522035 to your computer and use it in GitHub Desktop.
Install Scala, sbt, PlayFramefork for {scala,sbt,play}env.
#!/bin/bash
for version in 2.2.1 2.2.0 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0 1.2.7 1.2.6 1.2.5.3 1.2.5.2 1.2.5.1 1.2.5
do
mkdir -p ~/.playenv/versions && pushd ~/.playenv/versions > /dev/null
if [ -d play-${version} ]; then
echo "Play ${version} is already installed."
else
echo "Installing Play ${version}..."
stat=$(($(curl -LI http://downloads.typesafe.com/play/${version}/play-${version}.zip -o /dev/null -w '%{http_code}\n' -s)/100*100))
if [ 200 -eq ${stat} ]; then
curl -LO http://downloads.typesafe.com/play/${version}/play-${version}.zip
else
curl -LO http://downloads.typesafe.com/releases/play-${version}.zip
fi
unzip -o play-${version}.zip > /dev/null && rm -f play-${version}.zip
echo " done."
fi
popd > /dev/null
done
#!/bin/bash
for version in 0.13.1 0.13.0 0.12.4 0.12.3 0.12.2 0.12.1
do
mkdir -p ~/.sbtenv/versions/sbt-${version} && pushd ~/.sbtenv/versions/sbt-${version} > /dev/null
if [ -d sbt ]; then
echo "sbt ${version} is already installed."
else
echo "Installing sbt ${version}..."
curl -LO http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/${version}/sbt.tgz
tar xf sbt.tgz && rm -f sbt.tgz
echo " done."
fi
popd > /dev/null
done
#!/bin/bash
for version in 2.11.0-M8 2.11.0-M7 2.11.0-M5 2.11.0-M4 2.11.0-M3 2.11.0-M2 2.10.3 2.10.2 2.10.1 2.9.3 2.9.2 2.9.1-1 2.9.1.final
do
mkdir -p ~/.scalaenv/versions && cd ~/.scalaenv/versions > /dev/null
if [ -d scala-${version} ]; then
echo "Scala ${version} is already installed."
else
echo "Installing Scala ${version}..."
stat=$(($(curl -LI http://www.scala-lang.org/files/archive/scala-${version}.tgz -o /dev/null -w '%{http_code}\n' -s)/100*100))
if [ 200 -eq ${stat} ]; then
curl -LO http://www.scala-lang.org/files/archive/scala-${version}.tgz
else
curl -LO http://downloads.typesafe.com/scala/${version}/scala-${version}.tgz
fi
tar xf scala-${version}.tgz && rm -f scala-${version}.tgz
echo " done."
fi
popd > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment