2021-02-14 13:09:48 -05:00
|
|
|
#!/usr/bin/env bash
|
2021-02-11 17:49:09 -05:00
|
|
|
|
|
|
|
> $1
|
|
|
|
|
|
|
|
echo -n "#define GIT_SHA1 \"" > $1
|
|
|
|
|
2021-02-12 09:23:29 -05:00
|
|
|
if (command -v "git" >/dev/null) then
|
2021-02-11 17:49:09 -05:00
|
|
|
git rev-parse --short HEAD | tr -d '\n' >> $1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "\"" >> $1
|
|
|
|
echo "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1
|