Last change
on this file since 1548 was
1546,
checked in by stefan, 10 years ago
|
use wc -l instead of -w to accomodate people which use a spaces in paths
|
-
Property svn:executable set to
*
|
File size:
881 bytes
|
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=ftp |
---|
11 | echo "Using ftp command instead." |
---|
12 | else |
---|
13 | exit -1 |
---|
14 | fi |
---|
15 | fi |
---|
16 | |
---|
17 | echo " " |
---|
18 | echo "Running script for downloading the source code for the ASL" |
---|
19 | echo " " |
---|
20 | |
---|
21 | rm -f solvers.tar |
---|
22 | echo "Downloading the source code from www.netlib.org..." |
---|
23 | $wgetcmd ftp://www.netlib.org/ampl/solvers.tar |
---|
24 | |
---|
25 | rm -rf solvers |
---|
26 | |
---|
27 | echo "Unpacking the source code..." |
---|
28 | tar xf solvers.tar |
---|
29 | |
---|
30 | echo "Uncompressing the source files..." |
---|
31 | gunzip -fr solvers |
---|
32 | |
---|
33 | echo "Adding No_dtoa to CFLAGS..." |
---|
34 | cd solvers |
---|
35 | mv makefile.u makefile.u.orig |
---|
36 | sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u |
---|
37 | cd .. |
---|
38 | |
---|
39 | echo "Deleting the tar file..." |
---|
40 | rm solvers.tar |
---|
41 | |
---|
42 | echo " " |
---|
43 | echo "Done downloading the source code for ASL." |
---|
44 | echo " " |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.