-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate.sh
executable file
·28 lines (20 loc) · 1014 Bytes
/
update.sh
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
#!/bin/sh
#delete old content
rm -rf local
#recreate folders
mkdir local
mkdir local/templates
mkdir local/archetypes
#download templates
wget -O templates.zip --content-disposition https://ckm.highmed.org/ckm/retrieveResources?resourceType=template&templateType=normal&state1=INITIAL&state2=DRAFT&state3=TEAMREVIEW&state4=REVIEWSUSPENDED&state5=PUBLISHED&state6=REASSESS_DRAFT&state7=REASSESS_TEAMREVIEW&state8=REASSESS_REVIEWSUSPENDED&getLatestPublishedVersion=true
#download archetypes
wget -O archetypes.zip --content-disposition https://ckm.highmed.org/ckm/retrieveResources?resourceType=archetype&format=ADL&state1=INITIAL&state2=DRAFT&state3=TEAMREVIEW&state4=REVIEWSUSPENDED&state5=PUBLISHED&state6=REASSESS_DRAFT&state7=REASSESS_TEAMREVIEW&state8=REASSESS_REVIEWSUSPENDED&getLatestPublishedVersion=true
sleep 30
#unzip content
unzip templates.zip -d local/templates/
unzip archetypes.zip -d local/archetypes
rm templates.zip
rm archetypes.zip
git add local/
git commit -m "Update `date`"
git push