aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/msvc/clean.bat7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat
index d034ec57659..264f1c7663b 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
@@ -134,7 +135,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