mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 12:49:02 +00:00
14 lines
No EOL
259 B
Bash
14 lines
No EOL
259 B
Bash
#!/usr/bin/bash
|
|
|
|
> $1
|
|
|
|
echo -n "#define GIT_SHA1 \"" > $1
|
|
|
|
git --version 2>&1 >/dev/null
|
|
GIT_IS_AVAILABLE=$?
|
|
if [ $GIT_IS_AVAILABLE -ne 0 ]; then
|
|
git rev-parse --short HEAD | tr -d '\n' >> $1
|
|
fi
|
|
|
|
echo "\"" >> $1
|
|
echo "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1 |