diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-15 09:58:44 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-15 17:10:02 +0100 |
commit | b748bc695362b353af08a9d9019876761500012f (patch) | |
tree | f90fbd90fa51ce9e26c862518acbbd83f8e70953 /Algorithms/install-algs4.sh | |
download | coursera-b748bc695362b353af08a9d9019876761500012f.zip coursera-b748bc695362b353af08a9d9019876761500012f.tar.gz |
Algorithms : Initial commit
Diffstat (limited to 'Algorithms/install-algs4.sh')
-rwxr-xr-x | Algorithms/install-algs4.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Algorithms/install-algs4.sh b/Algorithms/install-algs4.sh new file mode 100755 index 0000000..e0ba67e --- /dev/null +++ b/Algorithms/install-algs4.sh @@ -0,0 +1,53 @@ +#! /bin/bash + +DST=$HOME/algs4 + +mkdir -p $DST +pushd $DST +mkdir bin +wget http://algs4.cs.princeton.edu/linux/drjava.jar +wget http://algs4.cs.princeton.edu/linux/drjava +chmod 700 drjava +mv drjava bin +wget http://algs4.cs.princeton.edu/code/stdlib.jar +wget http://algs4.cs.princeton.edu/code/algs4.jar +wget http://algs4.cs.princeton.edu/linux/checkstyle.zip +wget http://algs4.cs.princeton.edu/linux/findbugs.zip +unzip checkstyle.zip +rm checkstyle.zip +unzip findbugs.zip +rm findbugs.zip +wget http://algs4.cs.princeton.edu/linux/checkstyle.xml +wget http://algs4.cs.princeton.edu/linux/findbugs.xml +wget http://algs4.cs.princeton.edu/linux/checkstyle +wget http://algs4.cs.princeton.edu/linux/findbugs +chmod 700 checkstyle findbugs +mv checkstyle findbugs bin +mv checkstyle.xml checkstyle-5.5 +mv findbugs.xml findbugs-2.0.1 +wget http://algs4.cs.princeton.edu/linux/config.sh +mv config.sh bin + +popd + +(cat << EOF +public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World"); + } +} +EOF +) > HelloWorld.java && javac HelloWorld.java && java -cp . HelloWorld + +$DST/bin/checkstyle HelloWorld.java +$DST/bin/findbugs HelloWorld.class +rm HelloWorld.java HelloWorld.class + +echo "now point to:" +echo " http://algs4.cs.princeton.edu/code/" +echo " http://algs4.cs.princeton.edu/home/" +echo " https://class.coursera.org/algs4partI-002/class/index" +echo " http://coursera.cs.princeton.edu/algs4/testing/percolation/" +echo " http://coursera.cs.princeton.edu/algs4/testing/collinear/" +echo " http://coursera.cs.princeton.edu/algs4/testing/8puzzle/" +echo " http://coursera.cs.princeton.edu/algs4/testing/kdtree/" |