forked from hl7-eu/imaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_preProcessAndCheckAll.sh
More file actions
executable file
·67 lines (53 loc) · 1.94 KB
/
Copy path_preProcessAndCheckAll.sh
File metadata and controls
executable file
·67 lines (53 loc) · 1.94 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
ig_base="imaging"
version="${1:-}"
ensure_publisher_for_ig() {
ig_dir="$1"
local_publisher="$ig_dir/input-cache/publisher.jar"
parent_publisher="$(dirname "$ig_dir")/publisher.jar"
if [ -f "$local_publisher" ] || [ -f "$parent_publisher" ]; then
echo "IG Publisher FOUND for $ig_dir"
return 0
fi
echo "IG Publisher NOT FOUND for $ig_dir. Downloading publisher..."
mkdir -p "$ig_dir/input-cache"
curl -fL https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar \
-o "$ig_dir/input-cache/publisher.jar" --retry 3
if [ -f "$local_publisher" ] || [ -f "$parent_publisher" ]; then
echo "IG Publisher downloaded for $ig_dir"
return 0
fi
echo "IG Publisher still missing for $ig_dir after download. Aborting..."
return 1
}
echo ==================================================================================
echo Preprocessing - generate FHIR version specific IG
if [ -n "$version" ]; then
./_preprocessMultiVersion.sh "$version"
else
./_preprocessMultiVersion.sh
fi
echo ==================================================================================
echo ensure publisher is available for both IGs
ensure_publisher_for_ig "igs/${ig_base}-r4" || exit 1
ensure_publisher_for_ig "igs/${ig_base}-r5" || exit 1
echo ==================================================================================
echo check build R4
if [ "$version" = "4.0.1" ] || [ -z "$version" ]; then
cd igs/${ig_base}-r4
./_genonce.sh
cd ../..
fi
echo ==================================================================================
echo check build R5
if [ "$version" = "5.0.0" ] || [ -z "$version" ]; then
cd igs/${ig_base}-r5
./_genonce.sh
cd ../..
fi
echo ==================================================================================
echo validate external links in rendered output
if [ -f "./scripts/validate-links.sh" ]; then
bash ./scripts/validate-links.sh
else
echo "Warning: validate-links.sh not found, skipping link validation"
fi