#!/bin/sh set -e wgetcmd=wget wgetcount=`which wget 2>/dev/null | wc -l` if test ! $wgetcount = 1; then echo "Utility wget not found in your PATH." if test `uname` = Darwin; then wgetcmd=ftp echo "Using ftp command instead." else exit -1 fi fi echo " " echo "Running script for downloading the source code for the METIS" echo " " rm -f metis-4.0.tar.gz echo "Downloading the source code from glaros.dtc.umn.edu..." $wgetcmd http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz rm -rf metis-4.0 echo "Uncompressing the tarball..." gunzip metis-4.0.tar.gz echo "Unpacking the source code..." tar xf metis-4.0.tar echo "Deleting the tar file..." rm metis-4.0.tar echo "Apply patch file..." patch -p0 < metis.patch echo " " echo "Done downloading the source code for METIS." echo " "