cat creatools_install/share/creatools/Version.sh >> $filename_BinVersion
cat creatools_install/share/creatools/LocalFunctions.sh >> $filename_BinVersion
- echo "aria2c -x 16 http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.\$creatoolsMinorVersion.x/$fileTGZstring.tgz" >> $filename_BinVersion
+ echo "\`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.\$creatoolsMinorVersion.x/$fileTGZstring.tgz" >> $filename_BinVersion
echo "tar -xvzf $fileTGZstring.tgz" >> $filename_BinVersion
echo "rm -f $fileTGZstring.tgz" >> $filename_BinVersion
Mandriva)
echo Root password:
su -c "urpmi aria2"
+ downloadCpmmand=aria2
;;
Fedora)
echo Root password:
su -c "yum install aria2 -y"
+ downloadCpmmand=aria2
;;
Ubuntu)
echo Root password:
- su -c "apt-get --yes install aria2"
+ su -c "apt-get --yes install wget"
+ downloadCpmmand=wget
;;
MacOS)
- port install aria2 -y
+ port install curl -y
+ downloadCpmmand=curl
;;
*)
echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
rm -rf $CREATOOLSBINDIR
mkdir $CREATOOLSBINDIR
cd $CREATOOLSBINDIR
-aria2c http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+$downloadCpmmand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
source creatools-Linux-Bin.sh
cd ..
echo $OSVersion
}
+###########################################
+function getDownloadCommand {
+ local DISTRIB=`getDistrib`
+
+ if [ "$DISTRIB" == MacOS ] ; then downloadCommand=curl;
+ elif [ "$DISTRIB" == Fedora ] ; then downloadCommand=aria -x 16
+ elif [ "$DISTRIB" == Ubuntu ] ; then downloadCommand=wget
+ else downloadCommand="VOID_EED"
+ fi
+ echo $downloadCommand
+}
+
###########################################
function getncore {
if [ `uname` == Darwin ] ; then # MacOS
# fi
}
+
###########################################
function printconfig {
echo