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

Last change on this file since 439 was 436, checked in by stefan, 13 years ago

lous changes on glpk setup

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