2005-01-03 [colin] 0.9.13cvs25
[claws.git] / commitHelper
index 3c552c8f47bb27295aa914502544ea53dde5a4c8..7acd7977319cf935b7f4b6260e882e3317d512f8 100644 (file)
@@ -10,7 +10,7 @@ if [ "$1" == "--syncgtk2" ]; then
 fi;
 args=`echo $@`
 
-head -16 configure.ac | grep VERSION= > /tmp/commitTool.tmp
+head -16 configure.ac | grep VERSION= > /tmp/commitTool.tmp
 source /tmp/commitTool.tmp
 if [ -z "$EXTRA_GTK2_VERSION" ]; then
        EXTRA_VERSION=`echo $EXTRA_VERSION | awk -F'.' '{for (i=1;i<NF;i++){printf $i"."};printf $NF+1}'`
@@ -53,8 +53,14 @@ fi;
 if [ "$name" == "reboot" ]; then
        name="christoph";
 fi;
+if [ "$name" == "leroyc" ]; then
+       name="colin";
+fi;
+if [ "$name" == "torte" ]; then
+       name="thorsten";
+fi;
 
-log="`date +%Y-%m-%d` [$name]\t$nextsversion\n\n"
+log="`date --utc +%Y-%m-%d` [$name]\t$nextsversion\n\n"
 for line in $files; do
        file=`echo $line | cut -d' ' -f2`
        dir=`dirname $file`
@@ -73,14 +79,14 @@ if [ "$EDITOR" == "" ]; then
        EDITOR=vi
 fi;
 
-if [ -n "/tmp/logentry" ]; then
-       echo -e "\n#please type in the changelog entry" > /tmp/logentry
-fi;
+
+echo -e "#please complete the changelog entry below" > /tmp/logentry
+echo -e -n $log >> /tmp/logentry
+
 $EDITOR /tmp/logentry
 
 echo "--8<----------"
-echo -e -n $log
-grep -v "^#" /tmp/logentry |grep -v "^$" | sed "s/^/           /" > /tmp/log.tmp.$$ \
+grep -v "^#" /tmp/logentry > /tmp/log.tmp.$$ \
 && mv /tmp/log.tmp.$$ /tmp/logentry
 echo >> /tmp/logentry
 cat /tmp/logentry
@@ -97,8 +103,7 @@ echo -n "Is it ok (write to $chlog and update configure.ac) [y/N]?"
 read ans
 if [ "$ans" == "y" ]; then
        mv $chlog $chlog.old
-       echo -e -n $log > $chlog
-       cat /tmp/logentry >> $chlog
+       cat /tmp/logentry > $chlog
        cat $chlog.old >> $chlog
        rm $chlog.old