if [ -z $1 ]; then
	echo "Enter with mpich package diretory: \"./install.sh mpich2package\""
	exit
fi

if ! [ -d $1 ]; then
	echo "Enter with mpich package diretory: \"./install.sh mpich2package\""
	exit
fi

echo "Applying patch in ${1}"
local=$PWD
cd ${1}
tar -xzf $local/mpichPatch.tar.gz

echo
echo "Set enviroment variables:"
echo "  LUA_HOME - diretory of LUA instalation"
echo "  IG_HOME - diretory of Integrade instalation"
echo
echo "Execute configure in mpich package with parameter: \"-with-pm=igstart -with-pmi=igpm\""
