forked from adawarp/libpsvr
-
Notifications
You must be signed in to change notification settings - Fork 3
/
clean.bat
46 lines (38 loc) · 839 Bytes
/
clean.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
setlocal
::Initialise
set PROJECT_ROOT=%cd%
::Clean
call :cleanProjectFolder || goto handleError
call :cleanBuildFolder || goto handleError
::Exit batch script
goto exit
::---------------------------
::|Function definitions below
::---------------------------
::Clean up the old generated project folder
:cleanProjectFolder
IF EXIST %PROJECT_ROOT%\generated (
echo "Cleaning old generated folder..."
del /f /s /q %PROJECT_ROOT%\generated > nul
rmdir /s /q %PROJECT_ROOT%\generated
)
goto:eof
::Clean up the old build project folder
:cleanBuildFolder
IF EXIST %PROJECT_ROOT%\build (
echo "Cleaning old build folder..."
del /f /s /q %PROJECT_ROOT%\build > nul
rmdir /s /q %PROJECT_ROOT%\build
)
goto:eof
:handleError
echo "CLEAN FAILED"
endlocal
exit /b 1
goto:eof
:exit
echo "CLEAN SUCCESSFUL"
endlocal
exit /b 0
goto:eof