1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 11:53:11 +02:00
Files
anope/bin/putanope
T
svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b 55bf4dbcab Initial Anope Import
git-svn-id: svn://svn.anope.org/anope/trunk@1 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1 5417fbe8-f217-4b02-8779-1006273d7864
2004-03-28 21:59:56 +00:00

105 lines
2.0 KiB
Bash
Executable File

#!/bin/sh
#
# $Id: putanope,v 1.14 2003/12/02 23:02:28 joris Exp $
#
CTRL="version.log"
MODULE="anope-dev"
TMP="/tmp/putanope.$$"
TMP2="/tmp/putanope2.$$"
# We need an editor for the log entry
if [ "$EDITOR" == "" ]; then
EDITOR="vi"
fi
# Use default target, or provided?
if [ "$1" == "" ]; then
DST="$MODULE"
else
DST="$1"
fi
# Find where to run the rest of the script from.
if [ ! -d $DST ]; then
cd ..
if [ ! -d $DST ]; then
cd ..
if [ ! -d $DST ]; then
echo "*** Directory $DST does not exist, what's going on?"
echo ""
exit 1
fi
fi
fi
# CVSROOT dosnt need to be set, just read it form the CVS file :-)
CVSROOT=`cat ${DST}/CVS/Root`
cd $DST
# source control file
. $CTRL
# Version arithmetics
CVER="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILD}"
let minor="$(echo $VERSION_BUILD)"
let new="$minor + 1"
NVER="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${new}"
# Greet the developer
echo ""
echo "*** Using CVSROOT: $CVSROOT"
echo "*** Using module : $MODULE"
echo "*** Current ver : $CVER"
echo "*** Updated ver : $NVER"
echo ""
echo "*** Make sure you have updated Changes, Changes.conf, and"
echo "*** Changes.lang acordingly before you proceed."
echo -n "*** Ready to continue? (RETURN if so, CTRL-C otherwise) "
read FOO
cat > $TMP2 <<EOF
# Anope commit utility. Please use this template for your commits.
# Add Mantis bugs separated by spaces. The note part is free form.
BUILD : $NVER
BUGS :
NOTES :
EOF
$EDITOR $TMP2
echo "*** Ready to commit, please verify:"
echo ""
grep -v "^#" $TMP2
echo ""
echo -n "*** Perform commit? (RETURN if so, CTRL-C otherwise) "
read FOO
echo "*** Running indent..."
for source in *.c
do
indent -kr -nut $source
done
# Clean up indent backup files
rm -f *~
echo "*** Bumping the version number..."
sed "s/VERSION_BUILD=\"$VERSION_BUILD\"/VERSION_BUILD=\"$new\"/" $CTRL > $TMP
cat $TMP > $CTRL
TS="$(date '+%F %R')"
grep -v "^#" $TMP2 > $TMP
echo "VTAG : cvs checkout -D \"$TS\" $MODULE" >> $TMP
cd ..
cvs -d$CVSROOT commit -F $TMP $DST
rm -f $TMP $TMP2
echo "*** Done!"
exit 0