blob: d07017dc35c32c49e49fe4e7c446f9a7935ddf08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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 <<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
|