summaryrefslogtreecommitdiff
path: root/contrib/mtn2cl/mtn2cl.sh
blob: 09d6201bd392c6b3a34a8a86d4c74f112b5185f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#/bin/sh

# This script takes the last 1000 revs and writes a ChangeLog

for i in `mtn log --brief --no-graph --no-merges --to 57d2b2fc5c8e07d46b3aff668037c245742efd52 | awk '{print $2 ":" $1}'` ; do \
        export REV=`echo $i | awk -F: '{print $2}'`
        export AUTHOR=`echo $i | awk -F: '{print $1}'`
        export CL=`mtn ls certs ${REV} | grep -A 1 changelog | grep -v changelog | gawk -F'Value : '  '{ print $2 }'`
        if test -n "${CL}"  ; then
                echo "    ${CL}" >> ${AUTHOR}
        fi
done

for i in *@* ; do \
        echo $i: >> ChangeLog
        cat $i >> ChangeLog
        echo >> ChangeLog
done

rm `ls | grep -v ChangeLog | grep -v mtn2cl`