#!/bin/bash

#Some cleanup
rm -rf install metis-4.0
mkdir install

#Untar 
tar -zxvf  metis-4.0.tar.gz

#Move metis into install directory
mv metis-4.0/* install
rm -rf metis-4.0

#Apply patches
cd install 
patch -p1 < ../metis-4.0.patch
patch Makefile.in ../configs/4.0/greenplanet/Makefile.in.patch

#Compile
make
