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

Last change on this file since 1548 was 1546, checked in by stefan, 10 years ago

use wc -l instead of -w to accomodate people which use a spaces in paths

  • Property svn:executable set to *
File size: 881 bytes
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=ftp
11    echo "Using ftp command instead."
12  else
13    exit -1
14  fi
15fi
16
17echo " "
18echo "Running script for downloading the source code for the ASL"
19echo " "
20
21rm -f solvers.tar
22echo "Downloading the source code from www.netlib.org..."
23$wgetcmd ftp://www.netlib.org/ampl/solvers.tar
24
25rm -rf solvers
26
27echo "Unpacking the source code..."
28tar xf solvers.tar
29
30echo "Uncompressing the source files..."
31gunzip -fr solvers
32
33echo "Adding No_dtoa to CFLAGS..."
34cd solvers
35mv makefile.u makefile.u.orig
36sed -e 's/CFLAGS = /CFLAGS = -DNo_dtoa /g' makefile.u.orig > makefile.u
37cd ..
38
39echo "Deleting the tar file..."
40rm solvers.tar
41
42echo " "
43echo "Done downloading the source code for ASL."
44echo " "
45
Note: See TracBrowser for help on using the repository browser.