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
51 if [ "$name" == "dinh" ]; then
55 log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
56 for line in $files; do
57 file=`echo $line | cut -d' ' -f2`
59 filename=`basename $file`
60 cvsfile="$dir/CVS/Entries"
61 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
62 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
65 if [ "$version" != "0" ]; then
66 patchset="$patchset cvs diff -u -r $version -r $nextversion $file; "
68 patchset="$patchset diff -u /dev/null $file; "
71 patchset="$patchset ) > $nextsversion.patchset"
73 if [ "$EDITOR" == "" ]; then
78 echo -e "#please complete the changelog entry below" > /tmp/logentry
79 echo -e -n $log >> /tmp/logentry
84 grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
85 && mv /tmp/log.tmp.$$ /tmp/logentry
90 if [ -f ChangeLog-gtk2.claws ]; then
91 chlog="ChangeLog-gtk2.claws"
92 elif [ -f ChangeLog.claws ]; then
93 chlog="ChangeLog.claws"
97 echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
99 if [ "$ans" == "y" ]; then
101 cat /tmp/logentry > $chlog
102 cat $chlog.old >> $chlog
105 cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$nextextra/" > configure.ac.new \
106 && mv configure.ac.new configure.ac ;
108 echo "$patchset" >> PATCHSETS
110 if [ "$args" != "" ]; then
111 echo commiting $@ PATCHSETS $chlog configure.ac
112 cvs commit -m "`cat /tmp/logentry`" $@ PATCHSETS $chlog configure.ac
114 echo commiting recursively
115 cvs commit -m "`cat /tmp/logentry` "
118 wget -O /dev/null -o /dev/null http://www.colino.net/sylpheed-claws-gtk2/update.php3