coverity_check.sh 822 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #! /bin/sh
  2. # check if we use the correct directory
  3. ls src/civetweb.c
  4. if [ "$?" = "0" ]; then
  5. echo "Building files for coverity check ..."
  6. else
  7. echo "Run this script from the root directory of project!" 1>&2
  8. echo "username@hostname:/somewhere/civetweb$ ./resources/coverity_check.sh" 1>&2
  9. exit 1
  10. fi
  11. # remove last build
  12. rm -rf cov_int/
  13. rm civetweb_coverity_check.tgz
  14. make clean
  15. # new scan build
  16. ../cov-analysis-linux64-8.7.0/bin/cov-build --dir cov-int make WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_LUA_SHARED=1
  17. # pack build results for upload
  18. tar czvf civetweb_coverity_check.tgz cov-int
  19. # check if the build was successful
  20. echo
  21. ls -la civetweb_coverity_check.tgz
  22. if [ "$?" = "0" ]; then
  23. echo "... done"
  24. echo
  25. else
  26. echo "No civetweb_coverity_check.tgz file" 1>&2
  27. echo
  28. exit 1
  29. fi
  30. # return "ok"
  31. exit 0