Remove unused gen_git_commit_h scripts.

This commit is contained in:
levlam 2023-12-31 00:04:55 +03:00
parent 6d79dd9ea8
commit 962f7ec17b
2 changed files with 0 additions and 27 deletions

View File

@ -1,9 +0,0 @@
$commit = try { git rev-parse HEAD } catch { "unknown" }
try { git diff-index --quiet HEAD } catch {}
$dirty = if ($LASTEXITCODE) { "true" } else { "false" }
echo "#pragma once`r`n#define GIT_COMMIT `"$commit`"`r`n#define GIT_DIRTY $dirty" | out-file -encoding ASCII auto/git_info.h.new
if (-not (Test-Path .\auto\git_info.h) -or (Compare-Object $(Get-Content .\auto\git_info.h.new) $(Get-Content .\auto\git_info.h))) {
mv -Force auto/git_info.h.new auto/git_info.h
} else {
rm auto/git_info.h.new
}

View File

@ -1,18 +0,0 @@
#!/bin/sh
cd $(dirname $0)
commit="$(git rev-parse HEAD 2> /dev/null)"
commit="${commit:-unknown}"
git diff-index --quiet HEAD 2> /dev/null
if [ $? -ne 0 ]
then
dirty="true"
else
dirty="false"
fi
printf "#pragma once\n#define GIT_COMMIT \"$commit\"\n#define GIT_DIRTY $dirty\n" > auto/git_info.h.new
if cmp -s auto/git_info.h.new auto/git_info.h 2>&1 > /dev/null
then
rm -f auto/git_info.h.new
else
mv -f auto/git_info.h.new auto/git_info.h
fi