2
2
setlocal
3
3
rem Simple script to fetch source for external libraries
4
4
5
- if " % PCBUILD% " == " " (set PCBUILD=%~dp0 )
6
- if " % EXTERNALS_DIR% " == " " (set EXTERNALS_DIR=%PCBUILD% \..\externals)
5
+ if NOT DEFINED PCBUILD (set PCBUILD=%~dp0 )
6
+ if NOT DEFINED EXTERNALS_DIR (set EXTERNALS_DIR=%PCBUILD% \..\externals)
7
7
8
8
set DO_FETCH = true
9
9
set DO_CLEAN = false
@@ -34,7 +34,7 @@ call "%PCBUILD%\find_python.bat" "%PYTHON%"
34
34
35
35
git 2 >& 1 > nul
36
36
if ERRORLEVEL 9009 (
37
- if " % PYTHON% " == " " (
37
+ if NOT DEFINED PYTHON (
38
38
echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1
39
39
)
40
40
)
@@ -56,7 +56,7 @@ if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.5
56
56
for %%e in (%libraries% ) do (
57
57
if exist " %EXTERNALS_DIR% \%%e " (
58
58
echo .%%e already exists, skipping.
59
- ) else if " % PYTHON% " == " " (
59
+ ) else if NOT DEFINED PYTHON (
60
60
echo .Fetching %%e with git...
61
61
git clone --depth 1 https://github.com/%ORG% /cpython-source-deps --branch %%e " %EXTERNALS_DIR% \%%e "
62
62
) else (
@@ -74,7 +74,7 @@ if NOT "%IncludeSSL%"=="false" set binaries=%binaries% nasm-2.11.06
74
74
for %%b in (%binaries% ) do (
75
75
if exist " %EXTERNALS_DIR% \%%b " (
76
76
echo .%%b already exists, skipping.
77
- ) else if " % PYTHON% " == " " (
77
+ ) else if NOT DEFINED PYTHON (
78
78
echo .Fetching %%b with git...
79
79
git clone --depth 1 https://github.com/%ORG% /cpython-bin-deps --branch %%b " %EXTERNALS_DIR% \%%b "
80
80
) else (
0 commit comments