From cfb1bf063b09b8aad230ceee2b681dda73c79041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Costa=20Teixeira?= Date: Fri, 17 Jan 2020 10:12:04 +0100 Subject: [PATCH] Update batch to work with filepaths with spaces --- _genonce.bat | 6 +++--- _updatePublisher.bat | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_genonce.bat b/_genonce.bat index e21ba02..2c32e92 100644 --- a/_genonce.bat +++ b/_genonce.bat @@ -1,6 +1,6 @@ @ECHO OFF SET publisher_jar=org.hl7.fhir.publisher.jar -SET input_cache_path=%CD%\input-cache\ +SET input_cache_path=%CD%\input-cache ECHO Checking internet connection... PING tx.fhir.org -n 1 -w 1000 | FINDSTR TTL && GOTO isonline @@ -17,9 +17,9 @@ SET txoption= SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 IF EXIST "%input_cache_path%\%publisher_jar%" ( - JAVA -jar %input_cache_path%\%publisher_jar% -ig ig.ini %txoption% %* + JAVA -jar "%input_cache_path%\%publisher_jar%" -ig ig.ini %txoption% %* ) ELSE If exist "..\%publisher_jar%" ( - JAVA -jar ..\%publisher_jar% -ig ig.ini %txoption% %* + JAVA -jar "..\%publisher_jar%" -ig ig.ini %txoption% %* ) ELSE ( ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... ) diff --git a/_updatePublisher.bat b/_updatePublisher.bat index 3176eac..0e8653d 100644 --- a/_updatePublisher.bat +++ b/_updatePublisher.bat @@ -7,20 +7,20 @@ FOR %%x IN ("%CD%") DO SET upper_path=%%~dpx IF NOT EXIST "%input_cache_path%%publisher_jar%" ( IF NOT EXIST "%upper_path%%publisher_jar%" ( - SET jarlocation=%input_cache_path%%publisher_jar% + SET jarlocation="%input_cache_path%%publisher_jar%" SET jarlocationname=Input Cache ECHO IG Publisher is not yet in input-cache or parent folder. REM we don't use jarlocation below because it will be empty because we're in a bracketed if statement GOTO create ) ELSE ( ECHO IG Publisher FOUND in parent folder - SET jarlocation=%upper_path%%publisher_jar% + SET jarlocation="%upper_path%%publisher_jar%" SET jarlocationname=Parent folder GOTO:upgrade ) ) ELSE ( ECHO IG Publisher FOUND in input-cache - SET jarlocation=%input_cache_path%%publisher_jar% + SET jarlocation="%input_cache_path%%publisher_jar%" SET jarlocationname=Input Cache GOTO:upgrade )