lcov-report/lcov-report.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit 01bcb90a73dc7f09b8fd8d10ca1fc061ffe4c16e Author: Maarten Hoes <hoes.maar...@gmail.com> Date: Sun Nov 16 23:41:00 2014 +0100 Dont 'rm TRACEFILE_DIR' when running '-a', some other minor fixes. Change-Id: Ie03e3052b6cb675af463c1dab02d5ffb08935746 Reviewed-on: https://gerrit.libreoffice.org/12506 Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com> Tested-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/lcov-report/lcov-report.sh b/lcov-report/lcov-report.sh index 4d7046a..a490b3b 100755 --- a/lcov-report/lcov-report.sh +++ b/lcov-report/lcov-report.sh @@ -53,7 +53,7 @@ init() if [ -z "${SRC_DIR?}" ] ; then die "When specifying '-a', you also need to specify '-s'." fi - if [ -d "${HTML_DIR?}" ] ; then + if [ ! -d "${HTML_DIR?}" ] ; then mkdir "${HTML_DIR?}" || die "Failed to create html directory ${HTML_DIR?}." else rm -rf "${HTML_DIR?}" @@ -65,6 +65,9 @@ init() if [ -z "${TRACEFILE_DIR?}" ] ; then die "When specifying '-a' or '-b', you also need to specify '-t'." fi + fi + + if [ "${BEFORE?}" = "TRUE" ] ; then if [ ! -d "${TRACEFILE_DIR?}" ] ; then mkdir "${TRACEFILE_DIR?}" || die "Failed to create tracefile directory ${TRACEFILE_DIR?}." else @@ -73,6 +76,12 @@ init() fi fi + if [ "${AFTER?}" = "TRUE" ] ; then + if [ ! -d "${TRACEFILE_DIR?}" ] ; then + die "Failed to locate tracefile directory ${TRACEFILE_DIR?}." + fi + fi + if [ "${SOURCE_COMPILE?}" = "TRUE" ] ; then if [ -z "${BUILD_DIR?}" ] ; then die "When specifying '-c', you also need to specify '-C'." @@ -136,7 +145,7 @@ lcov_tracefile_cleanup() lcov_mkhtml() { - cd "$SRC_DIR" + cd "${SRC_DIR?}" COMMIT_SHA1=$(git log --date=iso | head -3 | awk '/^commit/ {print $2}') COMMIT_DATE=$(git log --date=iso | head -3 | awk '/^Date/ {print $2}') @@ -173,7 +182,7 @@ AFTER= SRC_DIR= TRACEFILE_DIR= HTML_DIR= -BUIILD_DIR= +BUILD_DIR= if [ "$#" = "0" ] ; then usage @@ -208,8 +217,6 @@ while getopts ":s:t:w:C:abc" opt ; do esac done -echo "foo" - init if [ "${BEFORE?}" = "TRUE" ] ; then _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits