#!/bin/bash

release=ice1
repository=/home/larour/Ice_Repository
home=/home/seroussi
current=`pwd`

#Functions

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

#Date
today=`today_date`;

#Go to home directory
cd $home

#Erase to make a fresh tag;
if [ -d $release ] 
then
	rm -rf $release
fi

#Fetch cvs release
cvs -d $repository co -P $release 

#Tag cvs
cd $release
cvs -d $repository tag -R $today 
cd ../

#Erase cvs release
rm -rf "./$release"

#Go back to current directory
cd $current
