diff --git a/Util/BuildTools/BuildOSM2ODR.bat b/Util/BuildTools/BuildOSM2ODR.bat index 140699d21..5a4fb36e0 100644 --- a/Util/BuildTools/BuildOSM2ODR.bat +++ b/Util/BuildTools/BuildOSM2ODR.bat @@ -93,9 +93,12 @@ if %REMOVE_INTERMEDIATE% == true ( rem Build OSM2ODR if %BUILD_OSM2ODR% == true ( cd "%OSM2ODR_SOURCE_PATH%" - curl --retry 5 --retry-max-time 120 -L -o OSM2ODR.zip https://github.com/carla-simulator/sumo/archive/%CURRENT_OSM2ODR_COMMIT%.zip - tar -xf OSM2ODR.zip - cd sumo-%CURRENT_OSM2ODR_COMMIT% + if not exist "%OSM2ODR_SOURCE_PATH%" ( + curl --retry 5 --retry-max-time 120 -L -o OSM2ODR.zip https://github.com/carla-simulator/sumo/archive/%CURRENT_OSM2ODR_COMMIT%.zip + tar -xf OSM2ODR.zip + del OSM2ODR.zip + ren sumo-%CURRENT_OSM2ODR_COMMIT% %OSM2ODR_SOURCE_PATH% + ) if not exist "%OSM2ODR_VSPROJECT_PATH%" mkdir "%OSM2ODR_VSPROJECT_PATH%" cd "%OSM2ODR_VSPROJECT_PATH%"