From 55bf4dbcabf378e9472b7d31d6edf87f6ac853e9 Mon Sep 17 00:00:00 2001 From: "svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 28 Mar 2004 21:59:56 +0000 Subject: 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 --- bin/putanope | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100755 bin/putanope (limited to 'bin/putanope') diff --git a/bin/putanope b/bin/putanope new file mode 100755 index 000000000..d07017dc3 --- /dev/null +++ b/bin/putanope @@ -0,0 +1,104 @@ +#!/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 < $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 -- cgit