forked from HipsterSloth/PSMoveSteamVRBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean.bat
57 lines (48 loc) · 1.17 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
@echo off
setlocal
::Initialise
set PROJECT_ROOT=%cd%
set BUILD_PROPS_FILE=%PROJECT_ROOT%\build.properties
::Clean
call :cleanProjectFolder || goto handleError
call :cleanBuildFolder || goto handleError
call :cleanDependencies || goto handleError
::Exit batch script
goto exit
::---------------------------
::|Function definitions below
::---------------------------
::Clean up the old PSMoveSteamVRBridge 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 PSMoveSteamVRBridge 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
::Clean up the old PSMoveSteamVRBridge deps folder
:cleanDependencies
IF EXIST %PROJECT_ROOT%\deps (
echo "Cleaning old deps folder..."
del /f /s /q %PROJECT_ROOT%\deps > nul
rmdir /s /q %PROJECT_ROOT%\deps
)
goto:eof
:handleError
echo "CLEAN FAILED"
endlocal
exit /b 1
goto:eof
:exit
echo "CLEAN SUCCESSFUL"
endlocal
exit /b 0
goto:eof