Skip to content

Commit 30fd67c

Browse files
committed
Avoid using rm in build batch file
1 parent 96901b1 commit 30fd67c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

make_all.bat

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if "%1"=="quick" goto quick
22
@if "%1"=="already_built" goto already_built
3-
if exist build\. rm -rf build
3+
if exist build\. rd /s/q build
44
if exist build\. goto couldnt_rm
55
:quick
66
call build_all.bat
@@ -13,16 +13,16 @@ cd ..
1313
rem Now the binaries.
1414

1515
rem Yuck - 2to3 hackery - must nuke bdist dirs as it may hold py3x syntax.
16-
if exist build/bdist.win32/. rm -rf build/bdist.win32
17-
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
16+
if exist build/bdist.win32/. rd /s/q build\bdist.win32
17+
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64
1818
py -2.7-32 setup.py -q bdist_wininst --target-version=2.7 --skip-build
1919
py -2.7-32 setup.py -q bdist_wheel --skip-build
2020
py -2.7 setup.py -q bdist_wininst --target-version=2.7 --skip-build
2121
py -2.7 setup.py -q bdist_wheel --skip-build
2222

2323
rem Just incase - re-nuke bdist dirs so 2to3 always runs.
24-
if exist build/bdist.win32/. rm -rf build/bdist.win32
25-
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
24+
if exist build/bdist.win32/. rd /s/q build\bdist.win32
25+
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64
2626

2727
rem *sob* - for some reason 3.5 and later are failing to remove the bdist temp dir
2828
rem due to the mfc DLLs - but the dir can be removed manually.
@@ -66,8 +66,8 @@ py -3.9 setup.py -q bdist_wininst --skip-build --target-version=3.9
6666
py -3.9 setup.py -q bdist_wheel --skip-build
6767

6868
rem And nuke the dirs one more time :)
69-
if exist build/bdist.win32/. rm -rf build/bdist.win32
70-
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
69+
if exist build/bdist.win32/. rd /s/q build\bdist.win32
70+
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64
7171

7272
@goto xit
7373
:couldnt_rm

0 commit comments

Comments
 (0)