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

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

sync with trunk; rerun autotools

  • Property svn:executable set to *
File size: 1.2 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
20coinasl=solvers-20130815.tgz
21
22echo " "
23echo "Running script for downloading the source code for the ASL"
24echo " "
25
26rm -f solvers.tgz
27
28echo "Downloading the source code from projects.coin-or.org..."
29if $wgetcmd http://www.coin-or.org/BuildTools/ASL/$coinasl ;
30then
31  mv $coinasl solvers.tgz
32else
33  echo
34  echo "Failed, try downloading the source code from www.ampl.com..."
35  $wgetcmd http://www.ampl.com/netlib/ampl/solvers.tgz
36fi
37
38rm -rf solvers
39
40echo "Unpacking the source code..."
41gunzip -f solvers.tgz
42tar xf solvers.tar
43
44echo "Uncompressing the source files..."
45gunzip -fr solvers
46
47echo "Adding No_dtoa to CFLAGS..."
48cd solvers
49mv makefile.u makefile.u.orig
50sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u
51cd ..
52
53echo "Deleting the tar file..."
54rm solvers.tar
55
56echo " "
57echo "Done downloading the source code for ASL."
58echo " "
59
Note: See TracBrowser for help on using the repository browser.