#!/bin/sh

## Copyright (C) 2006-2011 Daniel Baumann <daniel.baumann@progress-technologies.net>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.


set -e

Tag ()
{
	_TAG="${1}"
	HASH="$(git log | grep -B4 ${_TAG} | awk '/^commit/ { print $2 }')"

	git-${_MODE}-tag ${_TAG} ${HASH}
}

for TAG in $(git tag | grep ^${_MODE})
do
	Tag $(echo ${TAG} | awk -F/ '{ print $2 }')
done
