-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_genonce.bat
More file actions
34 lines (27 loc) · 1 KB
/
_genonce.bat
File metadata and controls
34 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@ECHO OFF
SET publisher_jar=publisher.jar
SET input_cache_path=%CD%\input-cache
ECHO Checking internet connection...
PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
powershell -command "try { $response = Invoke-WebRequest -Uri 'https://tx.fhir.org' -TimeoutSec 10 -ErrorAction Stop; if ($response.StatusCode -eq 200) { exit 0 } else { exit 1 } } catch { exit 1 }" && GOTO isonline
ECHO We're offline...
SET txoption=-tx n/a
GOTO igpublish
:isonline
ECHO We're online
SET txoption=
:igpublish
SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
IF EXIST "%input_cache_path%\%publisher_jar%" (
JAVA -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% %*
) ELSE If exist "..\%publisher_jar%" (
JAVA -jar "..\%publisher_jar%" -ig . %txoption% %*
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
GOTO end
)
ECHO.
ECHO Stripping standards status extensions from generated resources...
python util\strip_standards_status_extensions.py
:end
PAUSE