conf/machine/include: add kexecboot.inc
[openembedded.git] / contrib / mtn2cl / mtn2cl.sh
1 #/bin/sh
2
3 mkdir logs
4
5 export LOGNAME=Changelog.`date -u "+%Y%m%d"`
6 export REV_NOW=`mtn automate heads |head -n1`
7
8 if test -e oldrev ; then
9     export OLD_REV=`cat oldrev`
10 else
11     export OLD_REV="l:\"1 week ago\""
12 fi
13
14 for i in `mtn log --brief --no-graph --no-merges --to "${OLD_REV}" --from "${REV_NOW}"| awk '{print $2 ":" $1}'` ; do \
15         export REV=`echo $i | awk -F: '{print $2}'`
16         export AUTHOR=`echo $i | awk -F: '{print $1}'`
17         export CL=`mtn ls certs ${REV} | grep -A 1 changelog | grep -v changelog | gawk -F'Value : '  '{ print $2 }'`
18         if test -n "${CL}"  ; then
19                 echo "    ${CL}" >> logs/${AUTHOR}
20         fi
21 done
22
23 cd logs
24 for i in * ; do \
25         echo $i: >> ../${LOGNAME}
26         cat $i >> ../${LOGNAME}
27         echo >> ../${LOGNAME}
28 done
29 cd ..
30
31 wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&bugidtype=include&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&known_name=1WFixed&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED&value0-0-0=&ctype=csv' -O logs/resolved-bugs.csv >& /dev/null
32
33 wget "http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bugidtype=include&chfield=%5BBug%20creation%5D&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=NEW&value0-0-0=&ctype=csv" -O logs/new-bugs.csv &>/dev/null
34
35 NEW_BUGS="`cat logs/new-bugs.csv | wc -l | tr -d " "`"
36 RESOLVED_BUGS="`cat logs/resolved-bugs.csv | wc -l | tr -d " "`"
37
38 echo -e "\n\nBugs fixed:" >> ${LOGNAME}
39 cat logs/resolved-bugs.csv | awk -F, '{print $1 " " $7 "\t " $8}' | sed s:\"::g >> ${LOGNAME}
40
41 echo -e "\n\nBugs opened:" >> ${LOGNAME}
42 cat logs/new-bugs.csv | awk -F, '{print $1 " " $7 "\t " $8}' | sed s:\"::g >> ${LOGNAME}
43
44 echo -e "\nIn total $NEW_BUGS bugs have been created and $RESOLVED_BUGS bugs were closed." >> ${LOGNAME}
45
46 echo ${REV_NOW} > oldrev
47
48 rm -Rf logs 
49