#!/bin/bash

#Get number of cpus on current platform
NUMCPUS=`grep -c processor /proc/cpuinfo`;

#m2html name
name=`echo *.zip | sed 's/\.zip//g'`

#Some cleanup
rm -rf install $name

#Create src and install directories
mkdir install

#uncompress
unzip $name.zip

#patch m2html (ignore CVS and SVN directories)
cat $name/m2html.m  | sed -e "s/'.' '..'/'.' '..' 'CVS' '.svn'/g" > $name/m2html2.m
mv $name/m2html2.m $name/m2html.m

#move to install directory
mv $name/* install
rm -rf $name

