Skip to content

Instantly share code, notes, and snippets.

@monaka
Last active August 29, 2015 14:00
Show Gist options
  • Save monaka/6e1cfb1fb8956934c5c9 to your computer and use it in GitHub Desktop.
Save monaka/6e1cfb1fb8956934c5c9 to your computer and use it in GitHub Desktop.
coveralls.sh
#!/bin/bash
# Based on https://github.com/azu/NSDate-Escort/blob/master/script/coveralls.sh
# Licensed under MITL.
declare -r gcov_dir="."
daclare -r file=""
## ======
generateGcov()
{
# doesn't set output dir to gcov...
for file in $(find ${gcov_dir} -name '*.gcda')
do
gcov-4.2 "${file}" -o "${gcov_dir}"
done
}
copyGcovToProjectDir()
{
cp -r "${gcov_dir}" gcov
}
removeGcov(){
rm -r gcov
}
main()
{
# generate + copy
generateGcov
copyGcovToProjectDir
# post
coveralls ${@+"$@"}
# clean up
removeGcov
}
main ${@+"$@"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment