cnq3/makefiles/create_git_header.sh

7 lines
179 B
Bash
Raw Normal View History

#!/bin/bash
COMMIT="$(git rev-parse HEAD)"
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "#define GIT_COMMIT \"${COMMIT}\"" > $1
echo "#define GIT_BRANCH \"${BRANCH}\"" >> $1