#!/bin/bash

#Some cleanup
rm -rf install src
rm -rf vim72
mkdir install src

#Untar 
bzip2 -d -k vim-7.2.tar.bz2
tar -xvf vim-7.2.tar
rm vim-7.2.tar

#Move vim into install directory
mv vim72/* src
rm -rf vim72

#Configure vim (icc seems to have issues with wctype.h)
export CC=gcc
cd src/src 
./configure \
	--prefix "$ISSM_DIR/externalpackages/vim/install" \
	--with-gcc "/usr/bin/gcc"

#Compile vim
make
make  install
