#!/bin/bash branch=$(git rev-parse --abbrev-ref HEAD) rev=$(git diff --quiet && git describe --long --always --dirty --exclude=* --abbrev=8 || echo "dirty") echo "-DAFRAPAY_GIT_BRANCH=\\\"$branch\\\" -DAFRAPAY_GIT_COMMIT=\\\"$rev\\\""