source: ThirdParty/ASL/trunk/get.ASL @ 3565

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

Reverse merging r3564 and r3563 after failed experiment

  • Property svn:executable set to *
File size: 1.1 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
34  echo "Download failed...exiting"
35fi
36
37rm -rf solvers
38
39echo "Unpacking the source code..."
40gunzip -f $coinasl.tar.gz
41tar xf $coinasl.tar
42mv mp-$coinasl/src/asl/solvers .
43rm -rf mp-$coinasl
44
45echo "Adding No_dtoa to CFLAGS..."
46cd solvers
47mv makefile.u makefile.u.orig
48sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u
49cd ..
50
51echo "Deleting the tar file..."
52rm $coinasl.tar
53
54echo " "
55echo "Done downloading the source code for ASL."
56echo " "
57
Note: See TracBrowser for help on using the repository browser.