-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean.bat
More file actions
51 lines (45 loc) · 1011 Bytes
/
Copy pathclean.bat
File metadata and controls
51 lines (45 loc) · 1011 Bytes
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
@echo off
:: Change to the directory where this script lives
cd /d "%~dp0"
:: Delete venv if it exists
IF EXIST "venv/" (
echo Removing venv/...
RD /S /Q "venv/" || (
echo Error: Could not remove python virtual environment "venv/"
pause
exit /b %ERRORLEVEL%
)
echo Removed venv/
)
IF EXIST "src/bin/" (
echo Removing src/bin/...
RD /S /Q "src/bin/" || (
echo Error: Could not remove "src/bin/"
pause
exit /b %ERRORLEVEL%
)
echo Removed src/bin/
)
IF EXIST "build/" (
echo Removing build/...
RD /S /Q "build/" || (
echo Error: Could not remove "build/"
pause
exit /b %ERRORLEVEL%
)
echo Removed build/
)
IF EXIST "dist/" (
echo Removing dist/...
RD /S /Q "dist/" || (
echo Error: Could not remove "dist/"
pause
exit /b %ERRORLEVEL%
)
echo Removed dist/
)
echo Clean completed successfully
:: Pause if arg not specified
IF "%~1"=="" (
pause
)