Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Be sure having cmake2.8 for detecting bindings.
[simgrid.git] / buildtools / pipol / liste_install.sh
1 #!/bin/bash
2
3 arch=`uname`
4
5 if [ -e /usr/bin/apt-get ] ; then
6     sudo apt-get -y install subversion
7     sudo apt-get -y install gcc
8     sudo apt-get -y install g++
9     sudo apt-get -y install make
10     sudo apt-get -y install openjdk-6-jdk
11     sudo apt-get -y install liblua5.1-dev lua5.1
12     sudo apt-get -y install ruby1.8-dev ruby
13     sudo apt-get -y install unzip
14     sudo apt-get -y install cmake
15     sudo apt-get -y install wget
16 fi
17
18 if [ -e /usr/bin/yum ] ; then
19         sudo yum -y update
20     sudo yum -y install subversion
21     sudo yum -y install gcc
22     sudo yum -y install make
23     sudo yum -y install java-1.6.0-openjdk
24     sudo yum -y install lua-devel lua
25     sudo yum -y install ruby-devel ruby
26     sudo yum -y install unzip
27     sudo yum -y install cmake
28     sudo yum -y install wget
29 fi
30
31 if [ x$arch = xDarwin ] ; then
32     sudo fink -y install svn
33     sudo fink -y install gcc42
34     sudo fink -y install make
35     sudo fink -y install java-1.6.0-openjdk
36     sudo fink -y install lua51-dev lua51
37     sudo fink -y install ruby18-dev ruby
38     sudo fink -y install unzip
39     sudo fink -y install cmake
40     sudo fink -y install wget
41 fi
42
43 which_svn=`which svn`           #svn necessary
44 which_gcc=`which gcc`           #gcc gcc necessary
45 which_gpp=`which g++`           #gcc g++ necessary
46 which_make=`which make`         #make necessary
47 which_java=`which java`         #java optional
48 which_lua=`which lua`           #lua
49 which_ruby=`which ruby`         #ruby
50 which_cmake=`which cmake`       #cmake necessary
51 which_unzip=`which unzip`       #unzip for gtnets
52 which_wget=`which wget`         #wget for cmake
53 echo $which_cmake
54 echo $which_unzip
55 echo $which_ruby
56 echo $which_lua
57 echo $which_java
58 echo $which_make
59 echo $which_gcc
60 echo $which_gpp
61 echo $which_svn
62
63 which_cmake_version=`cmake --version`
64 which_cpack_version=`cpack --version`
65 which_ctest_version=`ctest --version`
66 echo "current version of cmake : $which_cmake_version"
67 echo "current version of cpack : $which_cpack_version"
68 echo "current version of ctest : $which_ctest_version"
69 if [ "x$which_cmake_version" != "xcmake version 2.8.1" ] ; then
70         if [ "x$which_cmake_version" != "xcmake version 2.8.2" ] ; then
71                 which_cmake=`which cmake`
72                 which_cpack=`which cpack`
73                 which_ctest=`which ctest`
74                 wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
75                 if [ -e ./cmake-2.8.2.tar.gz ]
76                         tar zxvf cmake-2.8.2.tar.gz > /dev/null
77                         cd ./cmake-2.8*/
78                         cmake . > /dev/null
79                         make -j > /dev/null 2>&1
80                         sudo ln -sf `pwd`/bin/cmake $which_cmake
81                         sudo ln -sf `pwd`/bin/cpack $which_cpack
82                         sudo ln -sf `pwd`/bin/ctest $which_ctest
83                 fi
84                 which_cmake_version=`cmake --version`
85                 which_cpack_version=`cpack --version`
86                 which_ctest_version=`ctest --version`
87                 echo "new version of cmake : $which_cmake_version"
88                 echo "new version of cpack : $which_cpack_version"
89                 echo "new version of ctest : $which_ctest_version"
90                 cd ..
91         fi
92 fi