-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvalidate.hMSBuild.bat
More file actions
37 lines (29 loc) · 950 Bytes
/
validate.hMSBuild.bat
File metadata and controls
37 lines (29 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
::! Copyright (c) 2017 Denis Kuzmin <x-3F@outlook.com> github/3F
::! Copyright (c) hMSBuild contributors https://github.com/3F/hMSBuild/graphs/contributors
::! Licensed under the MIT License (MIT).
::! See accompanying License.txt file or visit https://github.com/3F/hMSBuild
@echo off
:: [1] Optional input directory where gnt.bat is located.
set "input=%~1"
if not defined input set "input=.\"
set core="%input%hMSBuild.bat"
if not exist %core% call :notfound %core% & exit /B2
call hMSBuild -GetNuTool ~
call :check ".\hMSBuild.bat.sha1" %core% LF
echo.
call :check ".\hMSBuild.bat.crlf.sha1" %core% CRLF
echo.
if "%~1"=="" pause
exit /B 0
:check
:: (1) path .sha1
:: (2) path to core
:: (2) LF/CRLF type
if not exist %1 call :notfound %1 & exit /B2
set /p _sha1=<%1
echo %~2 ?= %_sha1% (%~3)
call svc.gnt -sha1-cmp %2 %_sha1% -package-as-path
exit /B 0
:notfound
echo %1 is not found>&2
exit /B 0