#!/bin/bash if [ 0 -eq $(find -iname *.gcda | wc -l) ] then exit 0 fi gcov --source-prefix ${TRAVIS_BUILD_DIR} --preserve-paths --relative-only $(find -iname *.gcda) 1>/dev/null || exit 0 cat >coverage.json <>coverage.json <coverage.json <(head -n -1 coverage.json.tmp) <(echo -e " }\n ]\n}") curl -F json_file=@coverage.json https://coveralls.io/api/v1/jobs