Removes tabs from .sh files

Change-Id: I07f983cb70b5398727b0e92e17057b8cf72e281d
This commit is contained in:
Anne Gentle 2017-05-08 14:20:19 -05:00
parent 548a85d2a9
commit 85a3e439c9
3 changed files with 51 additions and 51 deletions

View File

@ -4,8 +4,8 @@ projects=$1
all=0 all=0
if [ "$projects" = "" ] ; then if [ "$projects" = "" ] ; then
projects=projects/*.json projects=projects/*.json
all=1 all=1
fi fi
mkdir -p results mkdir -p results
@ -14,43 +14,43 @@ rm -f results/*-openreviews*
rm -f results/*-openapproved* rm -f results/*-openapproved*
if [ -n "${GERRIT_USER}" ] ; then if [ -n "${GERRIT_USER}" ] ; then
EXTRA_ARGS="-u ${GERRIT_USER}" EXTRA_ARGS="-u ${GERRIT_USER}"
fi fi
if [ -n "${GERRIT_KEY}" ]; then if [ -n "${GERRIT_KEY}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}"
fi fi
if [ -n "${GERRIT_SERVER}" ]; then if [ -n "${GERRIT_SERVER}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}"
fi fi
metadata() { metadata() {
date -u date -u
echo -n "reviewstats HEAD: " echo -n "reviewstats HEAD: "
git rev-parse HEAD git rev-parse HEAD
echo echo
} }
for project in ${projects} ; do for project in ${projects} ; do
project_base=$(basename $(echo ${project} | cut -f1 -d'.')) project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
(metadata > results/${project_base}-openreviews.txt && openreviews -p ${project} -l 15 ${EXTRA_ARGS} -o results/${project_base}-openreviews.txt) (metadata > results/${project_base}-openreviews.txt && openreviews -p ${project} -l 15 ${EXTRA_ARGS} -o results/${project_base}-openreviews.txt)
openreviews -p ${project} --html -l 15 ${EXTRA_ARGS} -o results/${project_base}-openreviews.html openreviews -p ${project} --html -l 15 ${EXTRA_ARGS} -o results/${project_base}-openreviews.html
(metadata && openapproved -p ${project} ${EXTRA_ARGS}) > results/${project_base}-openapproved.txt (metadata && openapproved -p ${project} ${EXTRA_ARGS}) > results/${project_base}-openapproved.txt
done done
if [ "${all}" = "1" ] ; then if [ "${all}" = "1" ] ; then
(metadata && openreviews -a ${EXTRA_ARGS}) > results/all-openreviews.txt.tmp (metadata && openreviews -a ${EXTRA_ARGS}) > results/all-openreviews.txt.tmp
for f in results/*-openreviews.txt ; do for f in results/*-openreviews.txt ; do
(echo && cat $f) >> results/all-openreviews.txt.tmp (echo && cat $f) >> results/all-openreviews.txt.tmp
done done
mv results/all-openreviews.txt.tmp results/all-openreviews.txt mv results/all-openreviews.txt.tmp results/all-openreviews.txt
openreviews -a --html ${EXTRA_ARGS} | grep -v '</html>' > results/all-openreviews.html.tmp openreviews -a --html ${EXTRA_ARGS} | grep -v '</html>' > results/all-openreviews.html.tmp
for f in results/*-openreviews.html ; do for f in results/*-openreviews.html ; do
cat $f | grep -v 'html>' | grep -v 'head>' >> results/all-openreviews.html.tmp cat $f | grep -v 'html>' | grep -v 'head>' >> results/all-openreviews.html.tmp
done done
echo "</html>" >> results/all-openreviews.html.tmp echo "</html>" >> results/all-openreviews.html.tmp
mv results/all-openreviews.html.tmp results/all-openreviews.html mv results/all-openreviews.html.tmp results/all-openreviews.html
(metadata && openapproved -a ${EXTRA_ARGS}) > results/all-openapproved.txt (metadata && openapproved -a ${EXTRA_ARGS}) > results/all-openapproved.txt
fi fi

View File

@ -4,8 +4,8 @@ projects=$1
all=0 all=0
if [ "$projects" = "" ] ; then if [ "$projects" = "" ] ; then
projects=projects/*.json projects=projects/*.json
all=1 all=1
fi fi
mkdir -p results mkdir -p results
@ -13,37 +13,37 @@ mkdir -p results
rm -f results/*-reviewers-* rm -f results/*-reviewers-*
if [ -n "${GERRIT_USER}" ] ; then if [ -n "${GERRIT_USER}" ] ; then
EXTRA_ARGS="-u ${GERRIT_USER}" EXTRA_ARGS="-u ${GERRIT_USER}"
fi fi
if [ -n "${GERRIT_PASS}" ] ; then if [ -n "${GERRIT_PASS}" ] ; then
EXTRA_ARGS="${EXTRA_ARGS} -P ${GERRIT_PASS}" EXTRA_ARGS="${EXTRA_ARGS} -P ${GERRIT_PASS}"
fi fi
if [ -n "${GERRIT_KEY}" ] ; then if [ -n "${GERRIT_KEY}" ] ; then
EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}"
fi fi
if [ -n "${GERRIT_SERVER}" ] ; then if [ -n "${GERRIT_SERVER}" ] ; then
EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}"
fi fi
metadata() { metadata() {
date -u date -u
echo -n "reviewstats HEAD: " echo -n "reviewstats HEAD: "
git rev-parse HEAD git rev-parse HEAD
echo echo
} }
for project in ${projects} ; do for project in ${projects} ; do
project_base=$(basename $(echo ${project} | cut -f1 -d'.')) project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
for time in 30 60 90 180 365 1095; do for time in 30 60 90 180 365 1095; do
(metadata && reviewers -p ${project} -d ${time} ${EXTRA_ARGS} -o results/${project_base}-reviewers-${time} --outputs txt --outputs csv) (metadata && reviewers -p ${project} -d ${time} ${EXTRA_ARGS} -o results/${project_base}-reviewers-${time} --outputs txt --outputs csv)
done done
done done
if [ "${all}" = "1" ] ; then if [ "${all}" = "1" ] ; then
for time in 30 60 90 180 365 1095; do for time in 30 60 90 180 365 1095; do
(metadata && reviewers -a -d ${time} ${EXTRA_ARGS} -o results/all-reviewers-${time} --outputs txt --outputs csv) (metadata && reviewers -a -d ${time} ${EXTRA_ARGS} -o results/all-reviewers-${time} --outputs txt --outputs csv)
done done
fi fi

View File

@ -3,25 +3,25 @@
projects=projects/*.json projects=projects/*.json
if [ -n "${GERRIT_USER}" ] ; then if [ -n "${GERRIT_USER}" ] ; then
EXTRA_ARGS="-u ${GERRIT_USER}" EXTRA_ARGS="-u ${GERRIT_USER}"
fi fi
if [ -n "${GERRIT_KEY}" ] ; then if [ -n "${GERRIT_KEY}" ] ; then
EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}"
fi fi
if [ -n "${GERRIT_SERVER}" ] ; then if [ -n "${GERRIT_SERVER}" ] ; then
EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}"
fi fi
metadata() { metadata() {
date -u date -u
echo -n "reviewstats HEAD: " echo -n "reviewstats HEAD: "
git rev-parse HEAD git rev-parse HEAD
echo echo
} }
for project in ${projects} ; do for project in ${projects} ; do
project_base=$(basename $(echo ${project} | cut -f1 -d'.')) project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
(metadata && reviews_for_bugs -p ${project} ${EXTRA_ARGS}) > results/${project_base}-reviews-for-bugs.txt (metadata && reviews_for_bugs -p ${project} ${EXTRA_ARGS}) > results/${project_base}-reviews-for-bugs.txt
done done