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`
20 if [ "$merge" != "" ]; then
22 echo You have to update first
25 if [ "$modif" != "" ]; then
31 files=`cvs diff -uN $@ 2>/dev/null |grep ^Index`
33 #change if your login isn't your name
34 if [ "$name" == "claws" ]; then
37 if [ "$name" == "reboot" ]; then
40 if [ "$name" == "leroyc" ]; then
43 if [ "$name" == "torte" ]; then
47 log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
48 for line in $files; do
49 file=`echo $line | cut -d' ' -f2`
51 filename=`basename $file`
52 cvsfile="$dir/CVS/Entries"
53 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
54 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
57 patchset="$patchset cvs diff -u -r $version -r $nextversion $file;\
60 patchset="$patchset ) > $nextsversion.patchset"
62 if [ "$EDITOR" == "" ]; then
67 echo -e "#please complete the changelog entry below" > /tmp/logentry
68 echo -e -n $log >> /tmp/logentry
73 grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
74 && mv /tmp/log.tmp.$$ /tmp/logentry
79 if [ -f ChangeLog-gtk2.claws ]; then
80 chlog="ChangeLog-gtk2.claws"
81 elif [ -f ChangeLog.claws ]; then
82 chlog="ChangeLog.claws"
86 echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
88 if [ "$ans" == "y" ]; then
90 cat /tmp/logentry > $chlog
91 cat $chlog.old >> $chlog
94 cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$nextextra/" > configure.ac.new \
95 && mv configure.ac.new configure.ac ;
97 echo "$patchset" >> PATCHSETS
99 if [ "$args" != "" ]; then
100 echo commiting $@ PATCHSETS $chlog configure.ac
101 cvs commit -m "`cat /tmp/logentry`" $@ PATCHSETS $chlog configure.ac
103 echo commiting recursively
104 cvs commit -m "`cat /tmp/logentry` "