setlocal
rem Simple script to fetch source for external libraries
-if "%PCBUILD%"=="" (set PCBUILD=%~dp0)
-if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)
+if NOT DEFINED PCBUILD (set PCBUILD=%~dp0)
+if NOT DEFINED EXTERNALS_DIR (set EXTERNALS_DIR=%PCBUILD%\..\externals)
set DO_FETCH=true
set DO_CLEAN=false
git 2>&1 > nul
if ERRORLEVEL 9009 (
- if "%PYTHON%"=="" (
+ if NOT DEFINED PYTHON (
echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1
)
)
for %%e in (%libraries%) do (
if exist "%EXTERNALS_DIR%\%%e" (
echo.%%e already exists, skipping.
- ) else if "%PYTHON%"=="" (
+ ) else if NOT DEFINED PYTHON (
echo.Fetching %%e with git...
git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e"
) else (
for %%b in (%binaries%) do (
if exist "%EXTERNALS_DIR%\%%b" (
echo.%%b already exists, skipping.
- ) else if "%PYTHON%"=="" (
+ ) else if NOT DEFINED PYTHON (
echo.Fetching %%b with git...
git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b"
) else (