Skip to content

Commit a343d63

Browse files
committed
DOS clean-up with openai: Clean up Pre-clear Build Infrastructure
1 parent f7616de commit a343d63

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

generate_a_winpython_distro.bat

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,27 @@ set my_buildenv=C:\WinPdev\WPy64-310111
4444

4545
call :log_section preparing winPython for %my_pyver% (%my_python_target%)release %my_release%%my_flavor% (%my_release_level%) *** %my_arch% bit ***
4646

47-
rem Pre-clear previous build infrastructure
48-
if "%my_preclear_build_directory%"=="Yes" (
49-
echo "(%date% %time%) Pre-clear previous build infrastructure">>%my_archive_log%
50-
del -y %userprofile%\.jupyter\jupyter_notebook_config.py
51-
cd /D %my_root_dir_for_builds%\bd%my_python_target%
52-
set build_det=\%my_flavor%
53-
if "%my_flavor%"=="" set build_det=
54-
dir %build_det%
55-
ren bu%my_flavor% bu%my_flavor%_old
56-
start rmdir /S /Q bu%my_flavor%_old
57-
rmdir /S /Q bu%my_flavor%
58-
rmdir /S /Q dist
47+
REM === Step: Pre-clear previous build infrastructure ===
48+
49+
if /i "%my_preclear_build_directory%"=="Yes" (
50+
call :log_section Pre-clear previous build infrastructure
51+
52+
REM Delete Jupyter config if it exists
53+
if exist "%userprofile%\.jupyter\jupyter_notebook_config.py" (
54+
del /f /q "%userprofile%\.jupyter\jupyter_notebook_config.py"
55+
)
56+
57+
REM Navigate to build directory
58+
cd /D "%my_root_dir_for_builds%\bd%my_python_target%"
59+
60+
REM Rename previous build folder if it exists
61+
if exist "bu%my_flavor%" (
62+
ren "bu%my_flavor%" "bu%my_flavor%_old"
63+
rmdir /s /q "bu%my_flavor%_old"
64+
)
5965
)
6066

67+
6168
call :log_section Create a new build
6269

6370
cd /D %~dp0

0 commit comments

Comments
 (0)