2a137e7821
Change-Id: Ib9bd1039922f5338fdea2348d9f221709c2fafde Reviewed-on: https://review.openstack.org/36336 Approved: Russell Bryant <rbryant@redhat.com> Reviewed-by: Russell Bryant <rbryant@redhat.com> Tested-by: Jenkins
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
projects=$1
|
|
all=0
|
|
|
|
if [ "$projects" = "" ] ; then
|
|
projects=projects/*.json
|
|
all=1
|
|
fi
|
|
|
|
mkdir -p results
|
|
|
|
rm -f results/*-openreviews*
|
|
rm -f results/*-openapproved*
|
|
|
|
for project in ${projects} ; do
|
|
project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
|
|
(date -u && echo && ./openreviews.py -p ${project}) > results/${project_base}-openreviews.txt
|
|
./openreviews.py -p ${project} --html > results/${project_base}-openreviews.html
|
|
(date -u && echo && ./openapproved.py -p ${project}) > results/${project_base}-openapproved.txt
|
|
done
|
|
|
|
if [ "${all}" = "1" ] ; then
|
|
(date -u && echo && ./openreviews.py -a) > results/all-openreviews.txt.tmp
|
|
for f in results/*-openreviews.txt ; do
|
|
(echo && cat $f) >> results/all-openreviews.txt.tmp
|
|
done
|
|
mv results/all-openreviews.txt.tmp results/all-openreviews.txt
|
|
./openreviews.py -a --html | grep -v '</html>' > results/all-openreviews.html.tmp
|
|
for f in results/*-openreviews.html ; do
|
|
cat $f | grep -v 'html>' | grep -v 'head>' >> results/all-openreviews.html.tmp
|
|
done
|
|
echo "</html>" >> results/all-openreviews.html.tmp
|
|
mv results/all-openreviews.html.tmp results/all-openreviews.html
|
|
|
|
(date -u && echo && ./openapproved.py -a) > results/all-openapproved.txt
|
|
fi
|