source: ThirdParty/ASL/stable/1.2/get.ASL @ 2845

Last change on this file since 2845 was 2845, checked in by stefan, 6 years ago

sync with trunk rev2844

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/sh
2
3set -e
4
5wgetcmd=wget
6wgetcount=`which wget 2>/dev/null | wc -l`
7if 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
18fi
19
20echo " "
21echo "Running script for downloading the source code for the ASL"
22echo " "
23
24rm -f solvers.tar
25
26echo "Downloading the source code from projects.coin-or.org..."
27if $wgetcmd https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/src/solvers-20130815.tar ;
28then
29  mv solvers-20130815.tar solvers.tar
30else
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
41fi
42
43rm -rf solvers
44
45echo "Unpacking the source code..."
46tar xf solvers.tar
47
48echo "Uncompressing the source files..."
49gunzip -fr solvers
50
51echo "Adding No_dtoa to CFLAGS..."
52cd solvers
53mv makefile.u makefile.u.orig
54sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u
55cd ..
56
57echo "Deleting the tar file..."
58rm solvers.tar
59
60echo " "
61echo "Done downloading the source code for ASL."
62echo " "
63
Note: See TracBrowser for help on using the repository browser.