source: ThirdParty/Glpk/trunk/get.Glpk @ 788

Last change on this file since 788 was 788, checked in by stefan, 12 years ago

update to glpk 4.24
add patch to get correct status code if terminated because the gap is closed

File size: 1.0 KB
Line 
1#!/bin/sh
2
3set -e
4glpk_ver=4.24
5
6wgetcmd=wget
7wgetcount=`which wget 2>/dev/null | wc -w`
8if test ! $wgetcount = 1; then
9  echo "Utility wget not found in your PATH."
10  if test `uname` = Darwin; then
11    wgetcmd=ftp
12    echo "Using ftp command instead."
13  else
14    exit -1
15  fi
16fi
17
18echo " "
19echo "Running script to download the source code for GLPK $glpk_ver."
20echo " "
21
22rm -f glpk*.tgz
23
24echo "Downloading the source code from ftp.gnu.org..."
25$wgetcmd ftp://ftp.gnu.org/gnu/glpk/glpk-${glpk_ver}.tar.gz
26
27echo "Uncompressing the tarball..."
28gunzip -f glpk-${glpk_ver}.tar.gz
29
30
31if test -d glpk ; then
32  echo "Moving current glpk to glpk.OLD."
33  if test -d glpk.OLD ; then
34    rm -rf glpk.OLD
35  fi
36  mv glpk glpk.OLD
37fi
38
39echo "Unpacking the source code..."
40tar xf glpk-${glpk_ver}.tar
41
42echo "Deleting the tar file..."
43rm glpk-${glpk_ver}.tar
44
45mv glpk-${glpk_ver} glpk
46
47echo " "
48echo "Done downloading the source code for GLPK."
49echo "Applying patch file."
50echo " "
51
52patch -p0 < glpk.patch
53
54echo " "
55echo "Verify that there are no error message in the output above."
Note: See TracBrowser for help on using the repository browser.