source: ThirdParty/ASL/stable/1.3/get.ASL @ 3577

Last change on this file since 3577 was 3577, checked in by tkr, 4 years ago

Merging r3571:3573 from trunk

  • Property svn:executable set to *
File size: 1.3 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=1.3.0
21
22echo " "
23echo "Running script for downloading the source code for the ASL"
24echo " "
25
26rm -f $coinasl.tar.gz
27
28echo "Downloading the source code from Github..."
29if $wgetcmd https://github.com/ampl/mp/archive/$coinasl.tar.gz ;
30then
31  echo "Download finished."
32else
33    echo "Downloading from Github failed, trying www.coin-or.org..."
34    if $wgetcmd http://www.coin-or.org/BuildTools/ASL/$coinasl.tar.gz ;
35    then
36      echo "Download finished."
37    else
38      echo "Download failed...exiting"
39    fi 
40fi
41
42rm -rf solvers
43
44echo "Unpacking the source code..."
45gunzip -f $coinasl.tar.gz
46tar xf $coinasl.tar
47mv mp-$coinasl/src/asl/solvers .
48rm -rf mp-$coinasl
49
50echo "Adding No_dtoa to CFLAGS..."
51cd solvers
52mv makefile.u makefile.u.orig
53sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u
54cd ..
55
56echo "Applying path for MinGW"
57patch -p0 <mingw.patch
58
59echo "Deleting the tar file..."
60rm $coinasl.tar
61
62echo " "
63echo "Done downloading the source code for ASL."
64echo " "
65
Note: See TracBrowser for help on using the repository browser.