diff options
Diffstat (limited to 'clean.cmd')
-rw-r--r-- | clean.cmd | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -11,6 +11,7 @@ if [%1]==[] ( set bin=true set packages=true set tools=true + set all=false goto Begin ) @@ -42,6 +43,7 @@ if /I [%1] == [-all] ( set tools=true set bin=true set packages=true + set all=true goto Begin ) @@ -56,6 +58,13 @@ set "__ProjectDir=%~dp0" if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%" set "__RootBinDir=%__ProjectDir%\bin" +:: Check if VBCSCompiler.exe is running and stop it +tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul +if errorlevel 1 ( + echo Stop VBCSCompiler.exe execution. + for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F +) + if [%bin%] == [true] ( if exist "%__RootBinDir%" ( echo Deleting bin directory @@ -89,6 +98,12 @@ if [%packages%] == [true] ( ) ) +if [%all%] == [true] ( + echo Cleaning entire working directory ... + call git clean -xdf + exit /b !ERRORLEVEL! +) + echo Clean was successful exit /b 0 @@ -99,7 +114,7 @@ echo Options: echo -b - Cleans the bin directory echo -p - Cleans the packages directory echo -t - Cleans the tools directory -echo -all - Cleans everything +echo -all - Cleans everything and restores repository to pristine state echo. echo If no option is specified then clean.cmd -b -p -t is implied. exit /b
\ No newline at end of file |