Skip to content

Commit 0a79fee

Browse files
committed
Allow clean.bat to be run from anywhere
This was omitted from c3879a7 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.
1 parent 44ab2da commit 0a79fee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/tools/msvc/clean.bat

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ REM src/tools/msvc/clean.bat
44
set DIST=0
55
if "%1"=="dist" set DIST=1
66

7-
set D=%CD%
8-
if exist ..\msvc if exist ..\..\..\src cd ..\..\..
7+
setlocal
8+
9+
cd "%~dp0\..\..\.."
910

1011
if exist debug rd /s /q debug
1112
if exist release rd /s /q release
@@ -128,7 +129,7 @@ REM Clean up datafiles built with contrib
128129
REM cd contrib
129130
REM for /r %%f in (*.sql) do if exist %%f.in del %%f
130131

131-
cd %D%
132+
cd "%~dp0"
132133

133134
REM Clean up ecpg regression test files
134135
msbuild ecpg_regression.proj /NoLogo /v:q %MSBFLAGS% /t:clean

0 commit comments

Comments
 (0)