diff options
Diffstat (limited to 'scratch/netex-nl-cxx/process.sh')
-rwxr-xr-x | scratch/netex-nl-cxx/process.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scratch/netex-nl-cxx/process.sh b/scratch/netex-nl-cxx/process.sh new file mode 100755 index 0000000..8ab7a94 --- /dev/null +++ b/scratch/netex-nl-cxx/process.sh | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | set -eu | ||
4 | set -o pipefail | ||
5 | |||
6 | XSD_TAG="v9.3.0-draft1" | ||
7 | |||
8 | rm -rf ./gen ./vendor/src | ||
9 | mkdir -p gen vendor/src | ||
10 | |||
11 | curl -L "https://github.com/BISONNL/NeTEx-NL/archive/refs/tags/$XSD_TAG.tar.gz" -o ./vendor/netex-nl.tar.gz | ||
12 | tar -xzf ./vendor/netex-nl.tar.gz --strip-components 1 -C ./vendor/src/ | ||
13 | |||
14 | xsltproc -o ./vendor/src/xsd/netex-nl-basic-new.xsd ./merge-enums-into-basic.xslt ./vendor/src/xsd/netex-nl-basic.xsd | ||
15 | xsltproc -o ./vendor/src/xsd/netex-nl-data-new.xsd ./remove-enums-include.xslt ./vendor/src/xsd/netex-nl-data.xsd | ||
16 | xsltproc -o ./vendor/src/xsd/netex-nl-new.xsd ./remove-enums-include.xslt ./vendor/src/xsd/netex-nl.xsd | ||
17 | rm ./vendor/src/xsd/netex-nl-enums.xsd | ||
18 | mv ./vendor/src/xsd/netex-nl-basic-new.xsd ./vendor/src/xsd/netex-nl-basic.xsd | ||
19 | mv ./vendor/src/xsd/netex-nl-data-new.xsd ./vendor/src/xsd/netex-nl-data.xsd | ||
20 | mv ./vendor/src/xsd/netex-nl-new.xsd ./vendor/src/xsd/netex-nl.xsd | ||
21 | |||
22 | process () { | ||
23 | xsdcxx cxx-tree --output-dir ./gen --namespace-map http://www.opengis.net/gml/3.2=gml "vendor/src/xsd/$1.xsd" | ||
24 | } | ||
25 | |||
26 | process gml-bison | ||
27 | process netex-nl-basic | ||
28 | process netex-nl-data | ||
29 | process netex-nl | ||