-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathget.Metis
executable file
·61 lines (48 loc) · 1.27 KB
/
get.Metis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
set -e
wgetcmd=wget
wgetcount=`which wget 2>/dev/null | wc -l`
if test ! $wgetcount = 1; then
echo "Utility wget not found in your PATH."
if test `uname` = Darwin; then
wgetcmd="curl -L -O"
echo "Using curl instead."
elif test `uname` = FreeBSD; then
wgetcmd=fetch
echo "Using fetch instead."
else
exit -1
fi
fi
echo " "
echo "Running script for downloading the source code for the METIS"
echo " "
rm -f metis-4.0.3.tar.gz
echo "Downloading the source code from coin-or-tools.github.io..."
if $wgetcmd http://coin-or-tools.github.io/ThirdParty-Metis/metis-4.0.3.tar.gz ;
then
echo "Download finished."
else
echo
echo "Downloading from COIN-OR failed, trying glaros.dtc.umn.edu..."
if $wgetcmd http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz ;
then
echo "Download finished."
else
echo "Download failed...exiting"
fi
fi
rm -rf metis-4.0
echo "Uncompressing the tarball..."
gunzip metis-4.0.3.tar.gz
echo "Unpacking the source code..."
tar xf metis-4.0.3.tar
echo "Applying a patch..."
patch -p0 < metis.patch
echo "Renaming directory to match source code name..."
mv metis-4.0.? metis-4.0
echo "Deleting the tar file..."
rm metis-4.0.3.tar
echo " "
echo "Done downloading the source code for METIS."
echo " "