1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 04:40:00 +00:00
re3/printHash.sh

12 lines
206 B
Bash
Raw Normal View History

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