Last change
on this file since 2848 was
2845,
checked in by stefan, 7 years ago
|
sync with trunk rev2844
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | set -e |
---|
4 | |
---|
5 | wgetcmd=wget |
---|
6 | wgetcount=`which wget 2>/dev/null | wc -l` |
---|
7 | if test ! $wgetcount = 1; then |
---|
8 | echo "Utility wget not found in your PATH." |
---|
9 | if test `uname` = Darwin; then |
---|
10 | wgetcmd="curl -L -k -O" |
---|
11 | echo "Using ftp command instead." |
---|
12 | elif test `uname` = FreeBSD; then |
---|
13 | wgetcmd=fetch |
---|
14 | echo "Using fetch command instead." |
---|
15 | else |
---|
16 | exit -1 |
---|
17 | fi |
---|
18 | fi |
---|
19 | |
---|
20 | echo " " |
---|
21 | echo "Running script for downloading the source code for the ASL" |
---|
22 | echo " " |
---|
23 | |
---|
24 | rm -f solvers.tar |
---|
25 | |
---|
26 | echo "Downloading the source code from projects.coin-or.org..." |
---|
27 | if $wgetcmd https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/src/solvers-20130815.tar ; |
---|
28 | then |
---|
29 | mv solvers-20130815.tar solvers.tar |
---|
30 | else |
---|
31 | echo |
---|
32 | echo "Failed, try downloading the source code from www.netlib.org..." |
---|
33 | if ! $wgetcmd ftp://www.netlib.org/ampl/solvers.tar ; |
---|
34 | then |
---|
35 | echo |
---|
36 | echo "Failed, try downloading the source code from netlib.sandia.gov..." |
---|
37 | rm -f netlibfiles.tar* |
---|
38 | $wgetcmd http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/ampl/solvers |
---|
39 | mv netlibfiles.tar* solvers.tar |
---|
40 | fi |
---|
41 | fi |
---|
42 | |
---|
43 | rm -rf solvers |
---|
44 | |
---|
45 | echo "Unpacking the source code..." |
---|
46 | tar xf solvers.tar |
---|
47 | |
---|
48 | echo "Uncompressing the source files..." |
---|
49 | gunzip -fr solvers |
---|
50 | |
---|
51 | echo "Adding No_dtoa to CFLAGS..." |
---|
52 | cd solvers |
---|
53 | mv makefile.u makefile.u.orig |
---|
54 | sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u |
---|
55 | cd .. |
---|
56 | |
---|
57 | echo "Deleting the tar file..." |
---|
58 | rm solvers.tar |
---|
59 | |
---|
60 | echo " " |
---|
61 | echo "Done downloading the source code for ASL." |
---|
62 | echo " " |
---|
63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.