BD-Core-FHIR-IG/_genonce.sh
Julia Afeltra 7a4e0b6b38 Minor updates to IG scripts
- Update updatePublisher scripts to have more clear options for prompts. Add space after prompt for clarity.
- Update genonce.sh script to not depend on wget. Instead use curl to check internet connection since it is used in updatePublisher.
- Update gencontinuous scripts to reference relative genonce scripts.
2020-03-16 15:42:16 -04:00

30 lines
628 B
Bash
Executable File

#!/bin/bash
publisher_jar=org.hl7.fhir.publisher.jar
input_cache_path=./input-cache/
set -e
echo Checking internet connection...
curl -sSf tx.fhir.org > /dev/null
if [ $? -eq 0 ]; then
echo "Online"
txoption=""
else
echo "Offline"
txoption="-tx n/a"
fi
echo "$txoption"
publisher=$input_cache_path/$publisher_jar
if test -f "$publisher"; then
JAVA -jar $publisher -ig ig.ini $txoption $*
else
publisher=../$publisher_jar
if test -f "$publisher"; then
JAVA -jar $publisher -ig ig.ini $txoption $*
else
echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
fi
fi