2004-08-06 18:49:38 +02:00
|
|
|
#!/bin/bash
|
2004-08-07 18:52:36 +02:00
|
|
|
args=`echo $@`
|
2006-02-23 11:24:45 +01:00
|
|
|
tmpfile=${0##*/}.tmp
|
2004-08-06 18:49:38 +02:00
|
|
|
|
2006-02-23 11:24:45 +01:00
|
|
|
head -n 16 configure.ac | grep VERSION= > $tmpfile
|
|
|
|
source $tmpfile
|
2005-03-20 09:09:22 +01:00
|
|
|
EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
|
|
|
|
nextsversion="${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}"
|
|
|
|
nextextra="$EXTRA_VERSION"
|
|
|
|
nextextratype="head"
|
2006-02-23 11:24:45 +01:00
|
|
|
rm -f $tmpfile
|
2004-07-06 18:45:16 +02:00
|
|
|
|
|
|
|
IFS='
|
|
|
|
'
|
2004-08-07 14:35:24 +02:00
|
|
|
filelist=`cvs status $@ configure.ac 2>/dev/null |grep ^File`
|
2004-07-06 18:45:16 +02:00
|
|
|
|
|
|
|
for file in $filelist; do
|
|
|
|
merge=`echo $file | grep Merge`
|
|
|
|
modif=`echo $file | grep Locally`
|
2005-04-12 22:56:53 +02:00
|
|
|
patch=`echo $file | grep Patch`
|
2005-04-12 19:58:06 +02:00
|
|
|
if [ "$patch" != "" ]; then
|
|
|
|
echo $patch
|
|
|
|
echo You have to update first
|
|
|
|
exit
|
|
|
|
fi;
|
|
|
|
if [ "$merge" != "" ]; then
|
|
|
|
echo $merge
|
2004-07-06 18:45:16 +02:00
|
|
|
echo You have to update first
|
|
|
|
exit
|
|
|
|
fi;
|
|
|
|
if [ "$modif" != "" ]; then
|
|
|
|
echo $modif
|
|
|
|
fi;
|
|
|
|
done;
|
|
|
|
patchset="("
|
|
|
|
log=""
|
2006-02-23 11:24:45 +01:00
|
|
|
files=`cvs diff -uN $@ 2>$tmpfile |grep ^Index`
|
|
|
|
if [ "$files" == "" ]; then
|
|
|
|
echo Nothing to commit\!
|
2006-02-23 15:41:37 +01:00
|
|
|
if [ -s $tmpfile ]; then
|
2006-02-23 11:24:45 +01:00
|
|
|
echo See possible reason below:
|
|
|
|
cat $tmpfile
|
|
|
|
fi
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
rm -f $tmpfile
|
2004-07-09 11:07:30 +02:00
|
|
|
name=`whoami`
|
|
|
|
#change if your login isn't your name
|
|
|
|
if [ "$name" == "claws" ]; then
|
|
|
|
name="paul";
|
|
|
|
fi;
|
2004-08-11 08:45:23 +02:00
|
|
|
if [ "$name" == "leroyc" ]; then
|
|
|
|
name="colin";
|
|
|
|
fi;
|
2005-02-05 11:40:04 +01:00
|
|
|
if [ "$name" == "torte" ]; then
|
|
|
|
name="thorsten";
|
|
|
|
fi;
|
2005-07-04 02:30:44 +02:00
|
|
|
if [ "$name" == "dinh" ]; then
|
|
|
|
name="hoa";
|
|
|
|
fi;
|
2005-07-21 12:03:48 +02:00
|
|
|
if [ "$name" == "f" -o "$name" == "darkok" ]; then
|
2005-07-07 18:28:27 +02:00
|
|
|
name="darko";
|
|
|
|
fi;
|
2005-08-18 21:09:53 +02:00
|
|
|
if [ "$name" == "msp" ]; then
|
|
|
|
name="martin";
|
|
|
|
fi;
|
2005-10-16 22:02:44 +02:00
|
|
|
if [ "$name" == "devel" ]; then
|
|
|
|
name="mones";
|
|
|
|
fi;
|
2004-07-22 14:34:57 +02:00
|
|
|
|
2004-08-08 11:46:46 +02:00
|
|
|
log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
|
2004-07-06 18:45:16 +02:00
|
|
|
for line in $files; do
|
|
|
|
file=`echo $line | cut -d' ' -f2`
|
|
|
|
dir=`dirname $file`
|
|
|
|
filename=`basename $file`
|
|
|
|
cvsfile="$dir/CVS/Entries"
|
2004-07-09 11:07:30 +02:00
|
|
|
version=`grep "\/$filename\/" $cvsfile | cut -d'/' -f3`
|
2004-07-06 18:45:16 +02:00
|
|
|
nextversion=`echo $version | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
|
|
|
|
|
2004-07-09 11:07:30 +02:00
|
|
|
log="$log\t* $file\n"
|
2005-05-31 08:48:27 +02:00
|
|
|
if [ "$version" != "0" ]; then
|
2006-02-23 15:41:37 +01:00
|
|
|
patchset="$patchset cvs diff -u -r $version -r $nextversion $file; "
|
2005-05-31 08:48:27 +02:00
|
|
|
else
|
2006-02-23 15:41:37 +01:00
|
|
|
patchset="$patchset diff -u /dev/null $file; "
|
2005-05-31 08:48:27 +02:00
|
|
|
fi
|
2004-07-06 18:45:16 +02:00
|
|
|
done;
|
|
|
|
patchset="$patchset ) > $nextsversion.patchset"
|
2004-08-06 18:49:38 +02:00
|
|
|
|
2006-09-01 12:40:16 +02:00
|
|
|
if [ "$CVSEDITOR" == "" ]; then
|
|
|
|
if [ "$EDITOR" == "" ]; then
|
|
|
|
if [ "$VISUAL" != "" ]; then
|
|
|
|
EDITOR=$VISUAL
|
|
|
|
else
|
|
|
|
EDITOR=vi
|
|
|
|
fi;
|
2006-02-23 15:41:37 +01:00
|
|
|
fi;
|
2006-09-01 12:40:16 +02:00
|
|
|
else
|
|
|
|
EDITOR=$CVSEDITOR
|
2004-08-06 18:49:38 +02:00
|
|
|
fi;
|
|
|
|
|
2004-08-09 17:40:34 +02:00
|
|
|
echo -e "#please complete the changelog entry below" > /tmp/logentry
|
|
|
|
echo -e -n $log >> /tmp/logentry
|
|
|
|
|
2004-08-06 18:49:38 +02:00
|
|
|
$EDITOR /tmp/logentry
|
2004-08-07 14:35:24 +02:00
|
|
|
|
|
|
|
echo "--8<----------"
|
2004-08-09 17:40:34 +02:00
|
|
|
grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
|
2004-08-06 18:49:38 +02:00
|
|
|
&& mv /tmp/log.tmp.$$ /tmp/logentry
|
|
|
|
echo >> /tmp/logentry
|
|
|
|
cat /tmp/logentry
|
|
|
|
|
2005-10-31 12:31:39 +01:00
|
|
|
chlog="ChangeLog"
|
|
|
|
|
2004-07-06 18:45:16 +02:00
|
|
|
echo "--8<----------"
|
2004-08-06 17:57:10 +02:00
|
|
|
echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
|
2004-07-06 18:45:16 +02:00
|
|
|
read ans
|
|
|
|
if [ "$ans" == "y" ]; then
|
|
|
|
mv $chlog $chlog.old
|
2004-08-09 17:40:34 +02:00
|
|
|
cat /tmp/logentry > $chlog
|
2004-07-06 18:45:16 +02:00
|
|
|
cat $chlog.old >> $chlog
|
|
|
|
rm $chlog.old
|
2004-08-06 17:57:10 +02:00
|
|
|
|
2005-03-20 09:09:22 +01:00
|
|
|
cat configure.ac | sed "s/^EXTRA_VERSION=.*/EXTRA_VERSION=$nextextra/" > configure.ac.new \
|
|
|
|
&& mv configure.ac.new configure.ac ;
|
2004-08-06 17:57:10 +02:00
|
|
|
|
2004-07-06 18:45:16 +02:00
|
|
|
echo "$patchset" >> PATCHSETS
|
2004-08-06 18:49:38 +02:00
|
|
|
|
2004-08-07 18:52:36 +02:00
|
|
|
if [ "$args" != "" ]; then
|
2004-08-06 18:49:38 +02:00
|
|
|
echo commiting $@ PATCHSETS $chlog configure.ac
|
|
|
|
cvs commit -m "`cat /tmp/logentry`" $@ PATCHSETS $chlog configure.ac
|
2004-07-28 09:56:28 +02:00
|
|
|
else
|
2004-08-06 18:49:38 +02:00
|
|
|
echo commiting recursively
|
|
|
|
cvs commit -m "`cat /tmp/logentry` "
|
2004-07-28 09:56:28 +02:00
|
|
|
fi;
|
2004-08-07 14:35:24 +02:00
|
|
|
rm -f /tmp/logentry
|
2005-04-29 19:28:43 +02:00
|
|
|
wget -O /dev/null -o /dev/null http://www.colino.net/sylpheed-claws-gtk2/update.php3
|
2004-07-06 18:45:16 +02:00
|
|
|
fi
|