summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim.angus@roslin.ed.ac.uk>2014-08-27 17:13:27 +0100
committerTim Angus <tim@ngus.net>2014-08-28 11:20:29 +0100
commit73c333fd86148760c43ac032ad7891d01d3926c6 (patch)
treef2003177709a18523b90a43c1d3869c69b9d696a
parent6edcf7b161eb9f6bef4aef3900aae963aa71eea7 (diff)
Link instead of copy
-rwxr-xr-xjenkins-ci-build.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/jenkins-ci-build.sh b/jenkins-ci-build.sh
index 4a416c4e..2a94cfab 100755
--- a/jenkins-ci-build.sh
+++ b/jenkins-ci-build.sh
@@ -28,19 +28,17 @@ else
fi
if [ -n "${CPPCHECK}" ]; then
- if [ -e "${CPPCHECK}" ]; then
- # Copy the existing output
- BASENAME_CPPCHECK=`basename ${CPPCHECK}`
- cp ${CPPCHECK} ./${BASENAME_CPPCHECK}
- else
- CHECK_CPPCHECK=`command -v cppcheck >/dev/null`
+ if [ ! -f "${CPPCHECK}" ]; then
+ command -v cppcheck >/dev/null
if [ "$?" != "0" ]; then
echo "cppcheck not installed"
exit 1
fi
- cppcheck --enable=all --max-configs=1 --xml --xml-version=2 ./code 2> ${CPPCHECK}
+ cppcheck --enable=all --max-configs=1 --xml --xml-version=2 code 2> ${CPPCHECK}
fi
+
+ ln -s ${CPPCHECK} cppcheck.xml
fi
make -j${CORES} distclean ${BUILD_TYPE}