]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/Install-Creatools-Bin.sh
Merge branch 'vtk8itk5wx3-mingw64' of ssh://git.creatis.insa-lyon.fr/creaToolsTools...
[creaToolsTools.git] / Linux / scripts / Install-Creatools-Bin.sh
index 968e26e5dd4cfbe542cc1079dc5393c74512776b..b7fdcb8dff216e0e1ad55cd840083d712549bf3c 100755 (executable)
@@ -1,82 +1,25 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Santé)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-#
-#  This software is governed by the CeCILL-B license under French law and 
-#  abiding by the rules of distribution of free software. You can  use, 
-#  modify and/ or redistribute the software under the terms of the CeCILL-B 
-#  license as circulated by CEA, CNRS and INRIA at the following URL 
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability. 
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------  
 
-#!/bin/bash -e
 
-###########################################
-function getDistrib {
-    local OS=`uname`
 
-      if [ "$OS" == Darwin ] ; then OS=MacOS;
-##EED2016-10-15    
-##    elif [ "$OS" == Linux  ] ; then OS=$(lsb_release -i | awk '{print $3}')
-       elif [ "$OS" == Linux  ] ; then OS=`awk 'NR==1{print $1}' /etc/system-release`
 
-    else OS=""
-    fi
-# checkDistrib $OS
-    echo $OS
-}
-
-
-OperatingSystem=`getDistrib`
-
-  case "$OperatingSystem" in
-  Mandriva)
-     echo Root password:
-     su -c "urpmi aria2"
-         downloadCommand=aria2c 
-     ;;
-  Fedora)
-       ARIA2EXIST=$(rpm -qa | grep aria2 | wc -l)      
-       if [ "$ARIA2EXIST" -eq '1' ]; then 
-       echo Root password:
-       su -c "dnf install aria2 -y"
+if [ "$#" -ne 1 ]; then
+    echo "  Help:  Install-Creatools-Bin.sh  [pkg-dev|FinalUser]"
+       echo
+else
+       CREATOOLSBINDIR=Creatools-Bin
+       rm -rf $CREATOOLSBINDIR
+       mkdir $CREATOOLSBINDIR
+       cd $CREATOOLSBINDIR
+       $downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+       if [ "$1" = "pkg-dev" ]; then
+               echo "Installing creaTools pkg-dev ..."
+               source creatools-Linux-Bin.sh
+       elif  [ "$1" = "FinalUser" ]; then
+               echo "Installing creaTools FinalUser ..."
+               source creatools-Linux-Bin.sh FinalUser
+       else 
+               echo "Error.  Input parameter"
        fi
-       downloadCommand=aria2c
-    ;;
-  Ubuntu)
-     echo Root password:
-     su -c "apt-get --yes install wget"
-         downloadCommand=wget 
-     ;;
-  MacOS)
-     port install curl -y
-         downloadCommand=curl 
-     ;;
-  *)
-     echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
-     echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
-//     exit 0
-     ;;
-  esac
-
-CREATOOLSBINDIR=Creatools-Bin
-rm -rf $CREATOOLSBINDIR
-mkdir $CREATOOLSBINDIR
-cd $CREATOOLSBINDIR
-$downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
-source creatools-Linux-Bin.sh
-cd ..
-
+       cd ..
+fi