summaryrefslogtreecommitdiff
path: root/clean.cmd
blob: 9dbeecf572fc923f1bb7f8a47ec175b0f69a60fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@if not defined __echo @echo off
setlocal EnableDelayedExpansion

echo Running clean.cmd

if /I [%1] == [/?] goto Usage
if /I [%1] == [/help] goto Usage

:: Set __ProjectDir to be the directory of this script
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__RootBinDir=%__ProjectDir%\bin"

if exist "%__RootBinDir%"           rd /s /q "%__RootBinDir%"
if exist "%__ProjectDir%\Tools"     rd /s /q "%__ProjectDir%\Tools"

exit /b 0

:Usage
echo.
echo Repository cleaning script.
echo No option parameters.
exit /b