Fix compilation for windows

This commit is contained in:
Shinovon 2026-05-12 07:00:35 +05:00
parent 20c7bf7818
commit 7f9b635431
12 changed files with 70 additions and 7 deletions

14
printHash.sh Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env sh
if [ -z "${1}" ]
then
printf "%s\n" "Input the path to the file for writing the commit hash to."
else
printf "%s" "#define GIT_SHA1 \"" > $1
if (command -v "git" >/dev/null) then
git rev-parse --short HEAD | tr -d '\n' >> $1
fi
printf "%s\n" "\"" >> $1
printf "%s\n" "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1
fi