2 if [ "$1" == "--syncgtk2" ]; then
4 echo -n "sync with EXTRA_VERSION ? [xx] "
6 cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$newmicro/" > configure.ac.new \
7 && mv configure.ac.new configure.ac ;
8 cat configure.ac | sed "s/^EXTRA_GTK2_VERSION=.*/EXTRA_GTK2_VERSION=.0/" > configure.ac.new \
9 && mv configure.ac.new configure.ac ;
13 head -n 16 configure.ac | grep VERSION= > /tmp/commitTool.tmp
14 source /tmp/commitTool.tmp
15 if [ -z "$EXTRA_GTK2_VERSION" ]; then
16 EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
17 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}"
18 nextextra="$EXTRA_VERSION"
21 EXTRA_GTK2_VERSION=`echo $EXTRA_GTK2_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
22 nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}${EXTRA_GTK2_VERSION}"
23 nextextra="$EXTRA_GTK2_VERSION"
26 rm /tmp/commitTool.tmp
30 filelist=`cvs status $@ configure.ac 2>/dev/null |grep ^File`
32 for file in $filelist; do
33 merge=`echo $file | grep Merge`
34 modif=`echo $file | grep Locally`
36 if [ "$merge" != "" ]; then
38 echo You have to update first
41 if [ "$modif" != "" ]; then
47 files=`cvs diff -uN $@ 2>/dev/null |grep ^Index`
49 #change if your login isn't your name
50 if [ "$name" == "claws" ]; then
53 if [ "$name" == "reboot" ]; then
56 if [ "$name" == "leroyc" ]; then
60 log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
61 for line in $files; do
62 file=`echo $line | cut -d' ' -f2`
64 filename=`basename $file`
65 cvsfile="$dir/CVS/Entries"
66 version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
67 nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
70 patchset="$patchset cvs diff -u -r $version -r $nextversion $file;\
73 patchset="$patchset ) > $nextsversion.patchset"
75 if [ "$EDITOR" == "" ]; then
80 echo -e "#please complete the changelog entry below" > /tmp/logentry
81 echo -e -n $log >> /tmp/logentry
86 grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
87 && mv /tmp/log.tmp.$$ /tmp/logentry
92 if [ -f ChangeLog-gtk2.claws ]; then
93 chlog="ChangeLog-gtk2.claws"
94 elif [ -f ChangeLog.claws ]; then
95 chlog="ChangeLog.claws"
99 echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
101 if [ "$ans" == "y" ]; then
103 cat /tmp/logentry > $chlog
104 cat $chlog.old >> $chlog
107 if [ "$nextextratype" == "head" ]; then
108 cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$nextextra/" > configure.ac.new \
109 && mv configure.ac.new configure.ac ;
111 cat configure.ac | sed "s/^EXTRA_GTK2_VERSION=.*/EXTRA_GTK2_VERSION=$nextextra/" > configure.ac.new \
112 && mv configure.ac.new configure.ac ;
115 echo "$patchset" >> PATCHSETS
117 if [ "$args" != "" ]; then
118 echo commiting $@ PATCHSETS $chlog configure.ac
119 cvs commit -m "`cat /tmp/logentry`" $@ PATCHSETS $chlog configure.ac
121 echo commiting recursively
122 cvs commit -m "`cat /tmp/logentry` "