diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-20 23:01:54 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-22 11:50:09 +0900 |
commit | 112ca8677b9b024de5529712e559c968da40a67a (patch) | |
tree | a8e93a0b05d61aeaab1dab3288c5fc518cdd05c6 /debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh | |
parent | b37f44d6c7444ca20c48a07fdcaf7b2a812db5bd (diff) | |
download | extra-dependencies-112ca8677b9b024de5529712e559c968da40a67a.tar.gz extra-dependencies-112ca8677b9b024de5529712e559c968da40a67a.zip |
DEB uncrustify: added first version of uncrustify-trinity. This is basically the upstream 0.72.0 version of uncrustify, repackaged.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh')
-rwxr-xr-x | debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh new file mode 100755 index 00000000..e52a3594 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/coverity.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# +# ARGS: 1:remote +# + +BRANCH=coverity_scan + +if [ -z "$1" ] ; then + cat <<EOF +Usage: $0 REMOTE + +This script triggers a coverity build by pushing the current code to +the '$BRANCH' branch. + +It copies the current (master) branch over the '$BRANCH' branch, +then copies 'coverity.travis.yml' over '.travis.yml' and force-pushes +the new branch. + +You obviously must have commit rights on the repository, so this is +a maintainer-only script, unless you are pushing to your own fork. + +Example: + $0 origin +EOF + exit 1 +fi +REMOTE=$1 + +set -e + +if [ -z "$NOTIFICATION_EMAIL" ] ; then + NOTIFICATION_EMAIL=$(git config user.email) + if [ -z "$NOTIFICATION_EMAIL" ] ; then + echo "No notification email address set." + exit 1 + fi +fi + +if [ $(git rev-parse --abbrev-ref HEAD) != 'master' ] ; then + cat <<EOF +Please switch to the master branch before running this script. +EOF + exit 1 +fi + +if git describe --dirty | grep -q dirty ; then + cat <<EOF +Please clean up your dirty workspace before running this script. +EOF + exit 1 +fi + +echo "NOTIFICATION_EMAIL: $NOTIFICATION_EMAIL" + +if git branch | grep $BRANCH ; then + echo "Deleting local coverity_scan branch..." + git branch -D $BRANCH +fi + +git branch $BRANCH $REMOTE/master +git checkout -f $BRANCH + +sed "s|{NOTIFICATION_EMAIL}|$NOTIFICATION_EMAIL|" coverity.travis.yml > .travis.yml + +git add .travis.yml +git commit -m 'Copy coverity.travis.yml -> .travis.yml for coverity build.' +git push -f $REMOTE $BRANCH +git checkout master + +echo 'Finished.' |