2023-02-16 17:05:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
dir=$(pwd)
|
|
|
|
# Relative paths are different when building locally versus on CI
|
|
|
|
#if [[ "$dir" == *"package"* ]]; then
|
|
|
|
# SRC_DIR=$dir/../../../../../../src
|
|
|
|
# DEST_DIR=$dir/../src/main/java/
|
|
|
|
#else
|
|
|
|
SRC_DIR=/hirs/HIRS/src/
|
|
|
|
DEST_DIR=/hirs/HIRS/src/main/java #/hirs/attestationca/portal
|
|
|
|
#fi
|
|
|
|
|
|
|
|
XSD_FILE=$SRC_DIR/main/resources/swid_schema.xsd
|
|
|
|
|
2023-02-23 17:28:52 +00:00
|
|
|
if [ ! -d "$DEST_DIR/hirs/attestationca/utils/xjc" ]; then
|
|
|
|
xjc -p hirs.attestationca.utils.xjc $XSD_FILE -d $DEST_DIR -quiet
|
2023-02-16 17:05:36 +00:00
|
|
|
fi
|