add debug
[kps.git] / kps_web / init-script.sh
blobea53f9e3597981bcb258e1be00f36170d94c9b5a
1 #!/bin/sh
3 if [ -r $1 -a -w $2 ]; then
4 echo "begin to create history changelog"
5 readonly LGP=$1
6 KGP=$2
7 KGP=${KGP%%/}
8 else
9 echo "usage: $0 linux_kernel_source_dir kps_source_dir"
10 exit 1
13 #versions=""
15 cd $LGP
17 echo "create changelog for 2.6.12"
18 git log -M --date=short --pretty=format:"Author: %aN <%ae>; Date: %ad" --shortstat --dirstat --no-merges v2.6.12-rc2..v2.6.12 >/tmp/ChangeLog-2.6.12
19 git log v2.6.12-rc2..v2.6.12 --date=short --pretty=format:"%ad%n%b" --no-merges >/tmp/ChangeLog-2.6.12-other
21 loop=""
22 pre=""
23 for loop in $versions
25 if [ "$pre" = "" ]
26 then
27 pre=$loop
28 continue
30 echo "create changelog for $loop"
31 git log -M --date=short --pretty=format:"Author: %aN <%ae>; Date: %ad" --shortstat --dirstat --no-merges v$pre..v$loop >/tmp/ChangeLog-$loop
32 git log v$pre..v$loop --date=short --pretty=format:"%ad%n%b" --no-merges >/tmp/ChangeLog-$loop-other
33 pre=$loop
34 done
36 loop=""
37 for loop in $versions
39 echo "create other statistic changelog for $loop"
40 $KGP/kps_web/trimother.py /tmp/ChangeLog-$loop-other "report" > /tmp/ChangeLog-$loop-report
41 $KGP/kps_web/trimother.py /tmp/ChangeLog-$loop-other "review" > /tmp/ChangeLog-$loop-review
42 $KGP/kps_web/trimother.py /tmp/ChangeLog-$loop-other "test" > /tmp/ChangeLog-$loop-test
43 $KGP/kps_web/trimother.py /tmp/ChangeLog-$loop-other "ack" > /tmp/ChangeLog-$loop-ack
44 $KGP/kps_web/trimother.py /tmp/ChangeLog-$loop-other "sof" > /tmp/ChangeLog-$loop-sof
45 done