]> Creatis software - creaToolsTools.git/blob - Linux/scripts/Install-Creatools-Bin.sh
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
[creaToolsTools.git] / Linux / scripts / Install-Creatools-Bin.sh
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
7 #  This software is governed by the CeCILL-B license under French law and 
8 #  abiding by the rules of distribution of free software. You can  use, 
9 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
10 #  license as circulated by CEA, CNRS and INRIA at the following URL 
11 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
12 #  or in the file LICENSE.txt.
13 #
14 #  As a counterpart to the access to the source code and  rights to copy,
15 #  modify and redistribute granted by the license, users are provided only
16 #  with a limited warranty  and the software's author,  the holder of the
17 #  economic rights,  and the successive licensors  have only  limited
18 #  liability. 
19 #
20 #  The fact that you are presently reading this means that you have had
21 #  knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------  
23
24 #!/bin/bash -e
25
26 ###########################################
27 function getDistrib {
28     local OS=`uname`
29
30       if [ "$OS" == Darwin ] ; then OS=MacOS;
31     elif [ "$OS" == Linux  ] ; then OS=`awk 'NR==1{print $1}' /etc/issue`
32     else OS=""
33     fi
34 # checkDistrib $OS
35     echo $OS
36 }
37
38
39 OperatingSystem=`getDistrib`
40
41   case "$OperatingSystem" in
42   Mandriva)
43      echo Root password:
44      su -c "urpmi aria2"
45           downloadCpmmand=aria2 
46      ;;
47   Fedora)
48      echo Root password:
49      su -c "yum install aria2 -y"
50           downloadCpmmand=aria2 
51      ;;
52   Ubuntu)
53      echo Root password:
54      su -c "apt-get --yes install wget"
55           downloadCpmmand=wget 
56      ;;
57   MacOS)
58      port install curl -y
59           downloadCpmmand=curl 
60      ;;
61   *)
62      echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
63      echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
64 //     exit 0
65      ;;
66   esac
67
68 CREATOOLSBINDIR=Creatools-Bin
69 rm -rf $CREATOOLSBINDIR
70 mkdir $CREATOOLSBINDIR
71 cd $CREATOOLSBINDIR
72 $downloadCpmmand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
73 source creatools-Linux-Bin.sh
74 cd ..
75
76