BD-Core-FHIR-IG/_genonce.sh
Pétur Þór Valdimarsson d7aa4fa7ca Fixed incorrect boolean check in _updatePublisher.sh
Corrected call to java to allow for running on systems with case-sensitive file-systems.
2020-04-22 17:23:04 +02:00

29 lines
621 B
Bash
Executable File

#!/bin/bash
publisher_jar=org.hl7.fhir.publisher.jar
input_cache_path=./input-cache/
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