Permalink
Browse files

Moving setup scripts to another repo

  • Loading branch information...
0 parents commit db9c35720f08692b38a0beb89796ca8e9704a2cd Ben Tilford committed Jul 14, 2011
Showing with 249 additions and 0 deletions.
  1. +1 −0 README.md
  2. +29 −0 clojure.sh
  3. +47 −0 fantom.sh
  4. +23 −0 gosu.sh
  5. +44 −0 groovy.sh
  6. +25 −0 java.sh
  7. +24 −0 maven.sh
  8. +42 −0 scala.sh
  9. +14 −0 setup.sh
1 README.md
@@ -0,0 +1 @@
+Scripts to get a new ubuntu install up and running
29 clojure.sh
@@ -0,0 +1,29 @@
+#! /bin/bash
+
+
+scriptDir=$PWD
+echo "Enter clojure version or hit enter for 1.2.1"
+read version
+if [ "$version" == "" ]
+then
+ version="1.2.1"
+fi
+
+dl="clojure-$version.zip"
+url="https://github.com/downloads/clojure/clojure/$dl"
+
+echo "Setting up clojure $version from $url"
+sudo mkdir /opt/clojure
+cd /opt/clojure
+sudo wget "$url"
+sudo unzip "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/clojure/clojure-$version" /opt/clojure/latest
+sudo mkdir "/opt/clojure/clojure-$version/bin"
+
+clojure="/opt/clojure/clojure-$version/bin/clojure"
+echo "#! /bin/bash
+java -cp /opt/clojure/clojure-$version/clojure.jar clojure.main \$1" | sudo sh -c "cat > $clojure"
+sudo chmod a+x $clojure
+sudo update-alternatives --install /usr/bin/clojure clojure "/opt/clojure/latest/bin/clojure" 1
+sudo update-alternatives --install /usr/bin/clojure clojure "/opt/clojure/clojure-$version/bin/clojure" 2
47 fantom.sh
@@ -0,0 +1,47 @@
+#! /bin/bash
+
+
+echo "Enter fantom version or hit enter for 1.0.59"
+read version
+if [ "$version" == "" ]
+then
+ version="1.0.59"
+fi
+
+dl="fantom-$version.zip"
+url="http://fan.googlecode.com/files/$dl"
+
+echo "Setting up fantom $version from $url"
+sudo mkdir /opt/fantom
+cd /opt/fantom
+sudo wget "$url"
+sudo unzip "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/fantom/fantom-$version" /opt/fantom/latest
+sudo chmod -R a+x "/opt/fantom/fantom-$version/bin"
+
+sudo update-alternatives --install /usr/bin/fan fan "/opt/fantom/latest/bin/fan" 1
+sudo update-alternatives --install /usr/bin/fan fan "/opt/fantom/fantom-$version/bin/fan" 2
+
+sudo update-alternatives --install /usr/bin/fanlaunch fanlaunch "/opt/fantom/latest/bin/fanlaunch" 1
+sudo update-alternatives --install /usr/bin/fanlaunch fanlaunch "/opt/fantom/fantom-$version/bin/fanlaunch" 2
+
+
+sudo update-alternatives --install /usr/bin/fanp fanp "/opt/fantom/latest/bin/fanp" 1
+sudo update-alternatives --install /usr/bin/fanp fanp "/opt/fantom/fantom-$version/bin/fanp" 2
+
+sudo update-alternatives --install /usr/bin/fanr fanr "/opt/fantom/latest/bin/fanr" 1
+sudo update-alternatives --install /usr/bin/fanr fanr "/opt/fantom/fantom-$version/bin/fanr" 2
+
+sudo update-alternatives --install /usr/bin/fansh fansh "/opt/fantom/latest/bin/fansh" 1
+sudo update-alternatives --install /usr/bin/fansh fansh "/opt/fantom/fantom-$version/bin/fansh" 2
+
+sudo update-alternatives --install /usr/bin/fant fant "/opt/fantom/latest/bin/fant" 1
+sudo update-alternatives --install /usr/bin/fant fant "/opt/fantom/fantom-$version/bin/fant" 2
+
+sudo update-alternatives --install /usr/bin/flux flux "/opt/fantom/latest/bin/flux" 1
+sudo update-alternatives --install /usr/bin/flux flux "/opt/fantom/fantom-$version/bin/flux" 2
+
+sudo update-alternatives --install /usr/bin/jstub jstub "/opt/fantom/latest/bin/jstub" 1
+sudo update-alternatives --install /usr/bin/jstub jstub "/opt/fantom/fantom-$version/bin/jstub" 2
+
23 gosu.sh
@@ -0,0 +1,23 @@
+#! /bin/bash
+
+
+echo "Enter gosu version or hit enter for 0.8.6.1-C"
+read version
+if [ "$version" == "" ]
+then
+ version="0.8.6.1-C"
+fi
+
+dl="gosu-$version.tgz"
+url="http://gosu-lang.org/downloads/gosu-$version/$dl"
+
+echo "Setting up gosu $version from $url"
+sudo mkdir /opt/gosu
+cd /opt/gosu
+sudo wget "$url"
+sudo tar xzf "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/gosu/gosu-$version" /opt/gosu/latest
+
+sudo update-alternatives --install /usr/bin/gosu gosu "/opt/gosu/latest/bin/gosu" 1
+sudo update-alternatives --install /usr/bin/gosu gosu "/opt/gosu/gosu-$version/bin/gosu" 2
44 groovy.sh
@@ -0,0 +1,44 @@
+#! /bin/bash
+
+
+echo "Enter groovy version or hit enter for 1.8.0"
+read version
+if [ "$version" == "" ]
+then
+ version="1.8.0"
+fi
+
+dl="groovy-binary-$version.zip"
+url="http://dist.groovy.codehaus.org/distributions/$dl"
+
+echo "Setting up groovy $version from $url"
+sudo mkdir /opt/groovy
+cd /opt/groovy
+sudo wget "$url"
+sudo unzip "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/groovy/groovy-$version" /opt/groovy/latest
+
+sudo update-alternatives --install /usr/bin/groovy groovy "/opt/groovy/latest/bin/groovy" 1
+sudo update-alternatives --install /usr/bin/groovy groovy "/opt/groovy/groovy-$version/bin/groovy" 2
+
+sudo update-alternatives --install /usr/bin/groovyc groovyc "/opt/groovy/latest/bin/groovyc" 1
+sudo update-alternatives --install /usr/bin/groovyc groovyc "/opt/groovy/groovy-$version/bin/groovyc" 2
+
+sudo update-alternatives --install /usr/bin/grape grape "/opt/groovy/latest/bin/grape" 1
+sudo update-alternatives --install /usr/bin/grape grape "/opt/groovy/groovy-$version/bin/grape" 2
+
+sudo update-alternatives --install /usr/bin/groovyConsole groovyConsole "/opt/groovy/latest/bin/groovyConsole" 1
+sudo update-alternatives --install /usr/bin/groovyConsole groovyConsole "/opt/groovy/groovy-$version/bin/groovyConsole" 2
+
+sudo update-alternatives --install /usr/bin/groovysh groovysh "/opt/groovy/latest/bin/groovysh" 1
+sudo update-alternatives --install /usr/bin/groovysh groovysh "/opt/groovy/groovy-$version/bin/groovysh" 2
+
+sudo update-alternatives --install /usr/bin/java2groovy java2groovy "/opt/groovy/latest/bin/java2groovy" 1
+sudo update-alternatives --install /usr/bin/java2groovy java2groovy "/opt/groovy/groovy-$version/bin/java2groovy" 2
+
+
+
+
+
+
25 java.sh
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+
+echo "Oracle requires submitting a form to download the jdk. Opening browser..."
+xdg-open http://www.oracle.com/technetwork/java/javase/downloads/index.html
+
+echo "Path to installed JDK (JAVA_HOME or JDK_HOME)"
+read path
+
+
+echo "Setting up jdk"
+sudo mkdir /opt/java
+
+
+sudo ln -s "$path" /opt/java/latest
+sudo update-alternatives --install /usr/bin/java java "/opt/java/latest/bin/java" 1
+sudo update-alternatives --install /usr/bin/java java "$path/bin/java" 2
+
+sudo update-alternatives --install /usr/bin/javac javac "/opt/java/latest/bin/javac" 1
+sudo update-alternatives --install /usr/bin/javac javac "$path/bin/javac" 2
+
+sudo update-alternatives --install /usr/bin/javaws javaws "/opt/java/latest/bin/javaws" 1
+sudo update-alternatives --install /usr/bin/javaws javaws "$path/bin/javaws" 2
+
+
24 maven.sh
@@ -0,0 +1,24 @@
+#! /bin/bash
+
+
+defaultVersion="3.0.3"
+echo "Enter maven version or hit enter for $defaultVersion"
+read version
+if [ "$version" == "" ]
+then
+ version=$defaultVersion
+fi
+
+dl="apache-maven-$version-bin.tar.gz"
+url="http://mirrors.axint.net/apache//maven/binaries/$dl"
+
+echo "Setting up maven $version from $url"
+sudo mkdir /opt/maven
+cd /opt/maven
+sudo wget "$url"
+sudo tar xzf "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/maven/apache-maven-$version" /opt/maven/latest
+
+sudo update-alternatives --install /usr/bin/mvn mvn "/opt/maven/latest/bin/mvn" 1
+sudo update-alternatives --install /usr/bin/mvn mvn "/opt/maven/apache-maven-$version/bin/mvn" 2
42 scala.sh
@@ -0,0 +1,42 @@
+#! /bin/bash
+
+
+echo "Enter scala version or hit enter for 1.9.0.1"
+read version
+if [ "$version" == "" ]
+then
+ version="2.9.0.1"
+fi
+dl="scala-$version.tgz"
+url="http://www.scala-lang.org/downloads/distrib/files/$dl"
+
+echo "Setting up scala $version from $url"
+sudo mkdir /opt/scala
+cd /opt/scala
+sudo wget "$url"
+sudo tar xzf "$dl"
+sudo rm "$dl"
+sudo ln -s "/opt/scala/scala-$version" /opt/scala/latest
+
+
+sudo update-alternatives --install /usr/bin/scala scala "/opt/scala/latest/bin/scala" 1
+sudo update-alternatives --install /usr/bin/scala scala "/opt/scala/scala-$version/bin/scala" 2
+
+sudo update-alternatives --install /usr/bin/scalac scalac "/opt/scala/latest/bin/scalac" 1
+sudo update-alternatives --install /usr/bin/scalac scalac "/opt/scala/scala-$version/bin/scalac" 2
+
+sudo update-alternatives --install /usr/bin/fsc fsc "/opt/scala/latest/bin/fsc" 1
+sudo update-alternatives --install /usr/bin/fsc fsc "/opt/scala/scala-$version/bin/fsc" 2
+
+sudo update-alternatives --install /usr/bin/sbaz sbaz "/opt/scala/latest/bin/sbaz" 1
+sudo update-alternatives --install /usr/bin/sbaz sbaz "/opt/scala/scala-$version/bin/sbaz" 2
+
+sudo update-alternatives --install /usr/bin/sbaz-setup sbaz-setup "/opt/scala/latest/bin/sbaz-setup" 1
+sudo update-alternatives --install /usr/bin/sbaz-setup sbaz-setup "/opt/scala/scala-$version/bin/sbaz-setup" 2
+
+sudo update-alternatives --install /usr/bin/scalap scalap "/opt/scala/latest/bin/scalap" 1
+sudo update-alternatives --install /usr/bin/scalap scalap "/opt/scala/scala-$version/bin/scalap" 2
+
+sudo update-alternatives --install /usr/bin/scaladoc scaladoc "/opt/scala/latest/bin/scaladoc" 1
+sudo update-alternatives --install /usr/bin/scaladoc scaladoc "/opt/scala/scala-$version/bin/scaladoc" 2
+
14 setup.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+sudo apt-get install git guake
+ssh-keygen
+mkdir ~/work
+
+
+. java.sh
+. maven.sh
+. scala.sh
+. groovy.sh
+. clojure.sh
+. fantom.sh
+. gosu.sh

0 comments on commit db9c357

Please sign in to comment.