diff options
author | Mataes <mataes2007@gmail.com> | 2018-04-27 20:39:22 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-04-27 20:39:22 +0300 |
commit | b9ce1d4d98525490ca1a38e2d9fd4f3369adb3e0 (patch) | |
tree | 787c80a909776c1c4d099b638c83c7977bb070e2 /libs/tdlib/td/gen_git_commit_h.ps1 | |
parent | 5ed0126c16d061d6e87aa20c718e14608c66feec (diff) |
added tdlib library
Diffstat (limited to 'libs/tdlib/td/gen_git_commit_h.ps1')
-rw-r--r-- | libs/tdlib/td/gen_git_commit_h.ps1 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/tdlib/td/gen_git_commit_h.ps1 b/libs/tdlib/td/gen_git_commit_h.ps1 new file mode 100644 index 0000000000..2893f89c2a --- /dev/null +++ b/libs/tdlib/td/gen_git_commit_h.ps1 @@ -0,0 +1,9 @@ +$commit = git rev-parse HEAD +git diff-index --quiet HEAD +$dirty = $LASTEXITCODE +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 +} |