#!/bin/bash
#This bash routine  will create a tar file for the ISSM
#code. Just run the following command: 

#Some local script functions 
function today_date {
suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'` 
echo $suffix;
}

#Cleanup code 
cd $ISSM_DIR
make clean
make distclean

#Get rid of externalpackages
rm -rf externalpackages

#Create tar file, with today's date in the title;
cd $ISSM_DIR/..
today=`today_date`
tar zcvf issm-3.0-$today.tar.gz  `basename $ISSM_DIR`
