#!/bin/bash

# My personal script for creating a source release of Gnome Attacks

# Give the number of the release as an argument and the sources will be tagged,
# exported and zipped ready for upload

# Example:
# ./tag-and-create-release 0.3.2

UNDERSCORE_TAG=`echo $1 | tr '.' '_'`

#echo cvs tag Release$UNDERSCORE_TAG
#cvs tag Release$UNDERSCORE_TAG

echo cd ~/tmp
cd ~/tmp

echo cvs -d:ext:axis3x3@cvs.gnomeattacks.sourceforge.net:/cvsroot/gnomeattacks/ export -r Release$UNDERSCORE_TAG gnomeattacks
cvs -d:ext:axis3x3@cvs.gnomeattacks.sourceforge.net:/cvsroot/gnomeattacks/ export -r Release$UNDERSCORE_TAG gnomeattacks

echo rm -rf gnomeattacks/www
rm -rf gnomeattacks/www

echo mv gnomeattacks gnomeattacks-$1
mv gnomeattacks gnomeattacks-$1

echo tar -czf gnomeattacks-$1.tar.gz gnomeattacks-$1
tar -czf gnomeattacks-$1.tar.gz gnomeattacks-$1

