source: ThirdParty/Mumps/trunk/get.Mumps @ 957

Last change on this file since 957 was 957, checked in by andreasw, 14 years ago

make sure that an old MUMPS directory is deleted in case the script is called a second time

File size: 1.2 KB
Line 
1#!/bin/sh
2
3# Set the following to the latest MUMPS version.
4#  THERE MUST BE NO SPACE BEFORE AND AFTER THE EQUAL (=) OPERATOR.
5mumps_ver=4.7.3
6
7set -e
8
9if test "$1" = '-patch'; then
10  uname=`uname`
11  case "$uname" in
12    MINGW* | CYGWIN*)
13      patch=yes
14      ;;
15  esac
16fi
17
18wgetcmd=wget
19wgetcount=`which wget 2>/dev/null | wc -w`
20if test ! $wgetcount = 1; then
21  echo "Utility wget not found in your PATH."
22  if test `uname` = Darwin; then
23    wgetcmd=ftp
24    echo "Using ftp command instead."
25  else
26    exit -1
27  fi
28fi
29
30echo " "
31echo "Running script for downloading the source code for MUMPS"
32echo " "
33
34rm -f MUMPS*.tgz
35
36echo "Downloading the source code from ..."
37$wgetcmd http://mumps.enseeiht.fr/MUMPS_${mumps_ver}.tar.gz
38
39echo "Uncompressing the tarball..."
40gunzip -f MUMPS_${mumps_ver}.tar.gz
41
42echo "Unpacking the source code..."
43tar xf MUMPS_${mumps_ver}.tar
44
45echo "Deleting the tar file..."
46rm MUMPS_${mumps_ver}.tar
47
48rm -rf MUMPS
49mv MUMPS_${mumps_ver} MUMPS
50
51if test "$patch" = yes; then
52  echo "Applying a patch for version 4.7.3"
53  patch -p0 < mumps_4.7.3.Win.patch
54fi
55
56echo " "
57echo "Done downloading the source code for MUMPS."
58echo " "
59
60echo " "
61echo "Verify that there are no error message in the output above."
Note: See TracBrowser for help on using the repository browser.