From ca720ee3b7b125deecb5e1e905dd1c350d5f9b11 Mon Sep 17 00:00:00 2001 From: "Denis Kuzmin [ GitHub/3F ]" Date: Thu, 16 Jan 2020 16:11:04 +0300 Subject: [PATCH] Changed `%~dp0` to `%cd%` processing for the following in batch version by default: * `wpath` property * `-unpack` key --- embedded/exec.tpl | 4 ++-- embedded/sha1.cmd | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/embedded/exec.tpl b/embedded/exec.tpl index 1432ccd..a20d662 100644 --- a/embedded/exec.tpl +++ b/embedded/exec.tpl @@ -77,7 +77,7 @@ set args=%args: #__b_ECL## =!% :found call :core -call %msbuildexe% %$tpl.corevar$% /nologo /p:wpath="%~dp0/" /v:m /m:4 %args% +call %msbuildexe% %$tpl.corevar$% /nologo /p:wpath="%cd%/" /v:m /m:4 %args% set "msbuildexe=" set ret=%ERRORLEVEL% @@ -86,7 +86,7 @@ del /Q/F %$tpl.corevar$% exit /B %ret% :unpack -set $tpl.corevar$="%~dp0\%gntcore%" +set $tpl.corevar$="%cd%\%gntcore%" echo Generating minified version in %$tpl.corevar$% ... :core diff --git a/embedded/sha1.cmd b/embedded/sha1.cmd index a9f8e6b..fb8e429 100644 --- a/embedded/sha1.cmd +++ b/embedded/sha1.cmd @@ -5,7 +5,10 @@ echo SHA-1 test has been started. set msbuild="%~dp0\..\netmsb.bat" -call "%~dp0\gnt" -unpack || goto err +setlocal + cd "%~dp0" + call ".\gnt" -unpack || goto err +endlocal call %msbuild% "%~dp0\sha1_comparer.targets" /p:core1="%~dp0\gnt.min.core" /p:core2="%~dp0\gnt.core" /nologo /v:m /m:4 || goto err exit /B 0