hapi-fhir/sync.sh

42 lines
2.7 KiB
Bash
Raw Normal View History

2015-03-02 22:39:53 -05:00
#!/bin/sh
2015-11-15 12:22:56 -05:00
set -e
FHIRTRUNK=~/workspace/fhir/trunk
2015-11-29 11:43:09 -05:00
DIRVERSION=dstu2.1
PACKAGEVERSION=dstu21
2015-11-15 12:22:56 -05:00
# Resource Definitions
2015-11-29 11:43:09 -05:00
rm hapi-tinder-plugin/src/main/resources/res/$DIRVERSION/*
for i in $(find $FHIRTRUNK/build/source -name *-spreadsheet.xml | egrep "/[a-z0-9]+-spreadsheet"); do cp -v $i hapi-tinder-plugin/src/main/resources/res/$DIRVERSION/; done
2015-03-02 22:39:53 -05:00
2015-11-15 12:22:56 -05:00
# Datatype Definitions
2015-11-29 11:43:09 -05:00
rm hapi-tinder-plugin/src/main/resources/dt/$DIRVERSION/*
for i in $(find $FHIRTRUNK/build/source/datatypes | grep xml | grep -v spreadsheet | grep -v -); do cp -v $i hapi-tinder-plugin/src/main/resources/dt/$DIRVERSION/; done
2015-11-15 12:22:56 -05:00
# Compartments
2015-10-03 16:11:47 -04:00
cp ~/workspace/fhir/trunk/build/source/compartments.xml hapi-tinder-plugin/src/main/resources/compartment/
2015-11-15 12:22:56 -05:00
# ValueSets
2015-11-29 11:43:09 -05:00
cp $FHIRTRUNK/build/publish/valuesets.xml hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/valueset/
cp $FHIRTRUNK/build/publish/v3-codesystems.xml hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/valueset/
cp $FHIRTRUNK/build/publish/v2-tables.xml hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/valueset/
2015-11-15 12:22:56 -05:00
# Profiles
2015-11-29 11:43:09 -05:00
touch ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/profile/_.xml
rm ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/profile/*.xml
for i in $(find $FHIRTRUNK/build/publish | grep -E "publish\/[a-z]+\.profile.xml$"); do echo $i; cp $i hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/profile/; done
# Schematron
2015-11-29 11:43:09 -05:00
touch hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/a.sch
rm hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/*.sch
for i in $(ls $FHIRTRUNK/build/publish/*.sch | grep -v -); do cp -v $i ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/; done
# Schema
2015-11-29 11:43:09 -05:00
cp $FHIRTRUNK/build/publish/fhir-single.xsd ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/
cp $FHIRTRUNK/build/publish/fhir-xhtml.xsd ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/
cp $FHIRTRUNK/build/publish/xml.xsd ./hapi-fhir-validation-resources-$DIRVERSION/src/main/resources/org/hl7/fhir/instance/model/$PACKAGEVERSION/schema/
2015-11-29 11:43:09 -05:00
#find hapi-tinder-plugin/src/main/resources/res/$DIRVERSION | sed "s|.*/|<baseResourceName>|" | sed "s/-spread.*/<\/baseResourceName>/" | sort
2015-08-31 08:20:24 -04:00