source: ThirdParty/ASL/trunk/get.ASL

Last change on this file was 4148, checked in by stefan, 20 months ago

rename solvers-20191219.tgz to solvers-64919f75f.tgz

  • archive has changes from first quarter of 2020, too
  • 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 -O"
11    echo "Using curl instead."
12  elif test `uname` = FreeBSD; then
13    wgetcmd=fetch
14    echo "Using fetch instead."
15  else
16    exit -1
17  fi
18fi
19
20coinasl=solvers-64919f75f
21
22echo " "
23echo "Running script for downloading the source code for the ASL"
24echo " "
25
26rm -f $coinasl
27
28echo "Downloading the source code from www.coin-or.org..."
29if $wgetcmd https://www.coin-or.org/BuildTools/ASL/${coinasl}.tgz ;
30then
31  echo "Download finished."
32else
33  echo
34  echo "Downloading from COIN-OR failed, trying ampl.com..."
35  if $wgetcmd https://ampl.com/netlib/ampl/solvers.tgz ;
36  then
37    echo "Download finished."
38    mv solvers.tgz ${coinasl}.tgz
39  else
40    echo "Download failed...exiting"
41  fi
42fi
43
44rm -rf solvers
45
46echo "Unpacking the source code..."
47gunzip -f ${coinasl}.tgz
48tar xf $coinasl.tar
49
50echo "Applying patches"
51patch -p0 < mingw.patch
52patch -p0 < dtoa.patch
53
54echo "Deleting the tar file..."
55rm $coinasl.tar
56
57echo " "
58echo "Done downloading the source code for ASL."
59echo " "
Note: See TracBrowser for help on using the repository browser.