2 head -16 configure.ac | grep VERSION= > /tmp/commitTool.tmp
3 source /tmp/commitTool.tmp
4 if [ -z "$EXTRA_GTK2_VERSION" ]; then
5 EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
6 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}"
8 EXTRA_GTK2_VERSION=`echo $EXTRA_GTK2_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
9 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}${EXTRA_GTK2_VERSION}"
11 rm /tmp/commitTool.tmp
15 filelist=`cvs status $@ 2>/dev/null |grep ^File`
17 for file in $filelist; do
18 merge=`echo $file | grep Merge`
19 modif=`echo $file | grep Locally`
21 if [ "$merge" != "" ]; then
23 echo You have to update first
26 if [ "$modif" != "" ]; then
32 files=`cvs diff -u $@ 2>/dev/null |grep ^Index`
35 #change if your login isn't your name
36 if [ "$name" == "claws" ]; then
39 log="`date +%Y-%m-%d` [$name]\t$nextsversion\n\n"
40 for line in $files; do
41 file=`echo $line | cut -d' ' -f2`
43 filename=`basename $file`
44 cvsfile="$dir/CVS/Entries"
45 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
46 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
49 patchset="$patchset cvs diff -u -r $version -r $nextversion $file;\
52 patchset="$patchset ) > $nextsversion.patchset"
56 if [ -f ChangeLog-gtk2.claws ]; then
57 chlog="ChangeLog-gtk2.claws"
59 chlog="ChangeLog.claws"
61 echo -n "Is it ok (write to $chlog) [y/N]?"
63 if [ "$ans" == "y" ]; then
65 echo -e -n $log > $chlog
66 cat $chlog.old >> $chlog
68 echo "$patchset" >> PATCHSETS
69 echo "editing $chlog configure.ac..."
70 $EDITOR $chlog configure.ac
71 echo running cvs commit $@ PATCHSETS $chlog configure.ac
72 cvs commit $@ PATCHSETS $chlog configure.ac