cnq3/makefiles/create_git_header.sh
2020-01-06 01:04:16 +01:00

6 lines
177 B
Bash
Executable file

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