Add dev workflow scripts for build pipeline
[platform/upstream/coreclr.git] / clean.cmd
1 @if not defined __echo @echo off
2 setlocal EnableDelayedExpansion
3
4 echo Running clean.cmd
5
6 if /I [%1] == [/?] goto Usage
7 if /I [%1] == [/help] goto Usage
8
9 :: Set __ProjectDir to be the directory of this script
10 set "__ProjectDir=%~dp0"
11 :: remove trailing slash
12 if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
13 set "__RootBinDir=%__ProjectDir%\bin"
14
15 if exist "%__RootBinDir%"           rd /s /q "%__RootBinDir%"
16 if exist "%__ProjectDir%\Tools"     rd /s /q "%__ProjectDir%\Tools"
17
18 exit /b 0
19
20 :Usage
21 echo.
22 echo Repository cleaning script.
23 echo No option parameters.
24 exit /b