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

#> source  ./archive.sh


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

#Main 

#Cleanup code 
cd $ISSM_DIR
make -f MakefileIce clean
make clean
make distclean

#Get rid of packages
rm packages

cd $ISSM_DIR/..

#Create tar file, with today's date in the title;
today=`today_date`

tar zcvf issm-1.0-$today.tar.gz  `basename $ISSM_DIR`
