4 head -n 16 configure.ac | grep VERSION= > /tmp/commitTool.tmp
5 source /tmp/commitTool.tmp
6 EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
7 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}"
8 nextextra="$EXTRA_VERSION"
10 rm /tmp/commitTool.tmp
14 filelist=`cvs status $@ configure.ac 2>/dev/null |grep ^File`
16 for file in $filelist; do
17 merge=`echo $file | grep Merge`
18 modif=`echo $file | grep Locally`
19 patch=`echo $file | grep Patch`
20 if [ "$patch" != "" ]; then
22 echo You have to update first
25 if [ "$merge" != "" ]; then
27 echo You have to update first
30 if [ "$modif" != "" ]; then
36 files=`cvs diff -uN $@ 2>/dev/null |grep ^Index`
38 #change if your login isn't your name
39 if [ "$name" == "claws" ]; then
42 if [ "$name" == "reboot" ]; then
45 if [ "$name" == "leroyc" ]; then
48 if [ "$name" == "torte" ]; then
52 log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
53 for line in $files; do
54 file=`echo $line | cut -d' ' -f2`
56 filename=`basename $file`
57 cvsfile="$dir/CVS/Entries"
58 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
59 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
62 patchset="$patchset cvs diff -u -r $version -r $nextversion $file;\
65 patchset="$patchset ) > $nextsversion.patchset"
67 if [ "$EDITOR" == "" ]; then
72 echo -e "#please complete the changelog entry below" > /tmp/logentry
73 echo -e -n $log >> /tmp/logentry
78 grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
79 && mv /tmp/log.tmp.$$ /tmp/logentry
84 if [ -f ChangeLog-gtk2.claws ]; then
85 chlog="ChangeLog-gtk2.claws"
86 elif [ -f ChangeLog.claws ]; then
87 chlog="ChangeLog.claws"
91 echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
93 if [ "$ans" == "y" ]; then
95 cat /tmp/logentry > $chlog
96 cat $chlog.old >> $chlog
99 cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$nextextra/" > configure.ac.new \
100 && mv configure.ac.new configure.ac ;
102 echo "$patchset" >> PATCHSETS
104 if [ "$args" != "" ]; then
105 echo commiting $@ PATCHSETS $chlog configure.ac
106 cvs commit -m "`cat /tmp/logentry`" $@ PATCHSETS $chlog configure.ac
108 echo commiting recursively
109 cvs commit -m "`cat /tmp/logentry` "