forked from sakura-editor/sakura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc-hash-res.bat
43 lines (40 loc) · 1020 Bytes
/
calc-hash-res.bat
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
38
39
40
41
42
43
set OUTHASHFILE=%1
set SRCDIR=%2
if "%OUTHASHFILE%" == "" (
call :showhelp %0
exit /b 1
)
if "%SRCDIR%" == "" (
call :showhelp %0
exit /b 1
)
if not exist "%SRCDIR%" (
@echo.
@echo "%SRCDIR%" does not exist.
@echo.
call :showhelp %0
exit /b 1
)
if not defined CMD_PYTHON call %~dp0tools\find-tools.bat
if not defined CMD_PYTHON (
@echo NOTE: No python command
) else (
%CMD_PYTHON% calc-hash.py %OUTHASHFILE% %SRCDIR% .res
)
exit /b 0
@rem ------------------------------------------------------------------------------
@rem show help
@rem see http://orangeclover.hatenablog.com/entry/20101004/1286120668
@rem ------------------------------------------------------------------------------
:showhelp
@echo off
@echo usage
@echo %~nx1 "output hash file" "source directory"
@echo.
@echo parameter
@echo output hash file : filename of hash file
@echo source directory : source directory where target files are in
@echo.
@echo example
@echo %~nx1 sha256.txt sakura-buildLocal-Win32-Release
exit /b 0