diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-01-20 10:13:18 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-01-20 10:20:51 -0500 |
commit | 31680730ef7bac82ff09efa0824c2d8e5e8840f1 (patch) | |
tree | 4c10ef4708a8c71f9ea469497db0ab01a591b850 /src | |
parent | 8e8e253a7b90d89dd9cb9d33848b55ac79958351 (diff) | |
download | postgresql-31680730ef7bac82ff09efa0824c2d8e5e8840f1.tar.gz postgresql-31680730ef7bac82ff09efa0824c2d8e5e8840f1.zip |
Allow clean.bat to be run from anywhere
This was omitted from c3879a7b4c which modified the other msvc .bat
files.
Per request from Juan José SantamarÃa Flecha
Discussion: https://postgr.es/m/CAC+AXB0_fxYGbQoaYjCA8um7TTbOVP4L9aXnVmHwK8WzaT4gdA@mail.gmail.com
Backpatch to all live branches.
Diffstat (limited to 'src')
-rwxr-xr-x | src/tools/msvc/clean.bat | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat index 672bb2d6503..5cb7bf8daf5 100755 --- a/src/tools/msvc/clean.bat +++ b/src/tools/msvc/clean.bat @@ -4,8 +4,9 @@ REM src/tools/msvc/clean.bat set DIST=0 if "%1"=="dist" set DIST=1 -set D=%CD% -if exist ..\msvc if exist ..\..\..\src cd ..\..\.. +setlocal + +cd "%~dp0\..\..\.." if exist debug rd /s /q debug if exist release rd /s /q release @@ -131,7 +132,7 @@ REM Clean up datafiles built with contrib REM cd contrib REM for /r %%f in (*.sql) do if exist %%f.in del %%f -cd %D% +cd "%~dp0" REM Clean up ecpg regression test files msbuild ecpg_regression.proj /NoLogo /v:q %MSBFLAGS% /t:clean |