1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 06:35:54 +00:00
re3/printHash.sh
2021-02-14 21:11:15 +03:00

12 lines
214 B
Bash
Executable file

#!/usr/bin/env bash
> $1
echo -n "#define GIT_SHA1 \"" > $1
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