2 head -15 configure.ac | grep VERSION > /tmp/commitTool.tmp
3 source /tmp/commitTool.tmp
4 EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
5 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}"
10 filelist=`cvs status $@ 2>/dev/null |grep ^File`
12 for file in $filelist; do
13 merge=`echo $file | grep Merge`
14 modif=`echo $file | grep Locally`
16 if [ "$merge" != "" ]; then
18 echo You have to update first
21 if [ "$modif" != "" ]; then
27 files=`cvs diff -u $@ 2>/dev/null |grep ^Index`
30 #change if your login isn't your name
31 if [ "$name" == "claws" ]; then
33 elif [ "$name" == "reboot" ]; then
36 log="`date +%Y-%m-%d` [$name]\t$nextsversion\n\n"
37 for line in $files; do
38 file=`echo $line | cut -d' ' -f2`
40 filename=`basename $file`
41 cvsfile="$dir/CVS/Entries"
42 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
43 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
46 patchset="$patchset cvs diff -u -r $version -r $nextversion $file;\
49 patchset="$patchset ) > $nextsversion.patchset"
53 if [ -f ChangeLog-gtk2.claws ]; then
54 chlog="ChangeLog-gtk2.claws"
56 chlog="ChangeLog.claws"
58 echo -n "Is it ok (write to $chlog) [y/N]?"
60 if [ "$ans" == "y" ]; then
62 echo -e -n $log > $chlog
63 cat $chlog.old >> $chlog
65 echo "$patchset" >> PATCHSETS
66 echo "editing $chlog configure.ac..."
67 $EDITOR $chlog configure.ac
68 echo running cvs commit $@ PATCHSETS $chlog configure.ac
69 cvs commit $@ PATCHSETS $chlog configure.ac